Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use https://github.com/einride/aip-go #326

Open
glimchb opened this issue Apr 12, 2023 · 4 comments
Open

Use https://github.com/einride/aip-go #326

glimchb opened this issue Apr 12, 2023 · 4 comments

Comments

@glimchb
Copy link
Member

glimchb commented Apr 12, 2023

this might allow us to maintain less code...

glimchb added a commit to glimchb/opi-spdk-bridge that referenced this issue Jun 5, 2023
Related to opiproject#326

This will help us maintain less code

Signed-off-by: Boris Glimcher <[email protected]>
glimchb added a commit that referenced this issue Jun 6, 2023
Related to #326

This will help us maintain less code

Signed-off-by: Boris Glimcher <[email protected]>
@glimchb
Copy link
Member Author

glimchb commented Jun 7, 2023

first PR #434

import 	"go.einride.tech/aip/resourceid"
resourceID := resourceid.NewSystemGenerated()

@glimchb
Copy link
Member Author

glimchb commented Jun 7, 2023

second PR #435

import 	"go.einride.tech/aip/resourceid"
err := resourceid.ValidateUserSettable(in.NvmeControllerId)

@glimchb
Copy link
Member Author

glimchb commented Jun 7, 2023

third PR #437

import 	"go.einride.tech/aip/fieldmask"
err := fieldmask.Validate(request.UpdateMask, request.NvmeController)

@glimchb
Copy link
Member Author

glimchb commented Jun 7, 2023

maybe also https://github.com/einride/aip-go/blob/master/pagination/pagetoken.go

	// Use pagination.PageToken for offset-based page tokens.
	pageToken, err := pagination.ParsePageToken(request)
	if err != nil {
		return nil, status.Errorf(codes.InvalidArgument, "invalid page token")
	}
        ...
	// Set the next page token.
	if result.HasNextPage {
		response.NextPageToken = pageToken.Next(request).String()
	}
	// Respond.
	return response, nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant