Versions in this module Expand all Collapse all v0 v0.42.0 Jan 9, 2025 Changes in this version + const UCPResourcePrefix + const UCPScopePrefix + func DecodeMap(in any, out any) error + func GetResource[T any](ctx context.Context, databaseClient Client, id string) (*T, error) + type Client interface + Delete func(ctx context.Context, id string, options ...DeleteOptions) error + Get func(ctx context.Context, id string, options ...GetOptions) (*Object, error) + Query func(ctx context.Context, query Query, options ...QueryOptions) (*ObjectQueryResult, error) + Save func(ctx context.Context, obj *Object, options ...SaveOptions) error + type DatabaseOptions struct + ETag ETag + MaxQueryItemCount int + PaginationToken string + func NewDeleteConfig(opts ...DeleteOptions) DatabaseOptions + func NewQueryConfig(opts ...QueryOptions) DatabaseOptions + func NewSaveConfig(opts ...SaveOptions) DatabaseOptions + type DeleteOptions interface + ApplyDeleteOption func(DatabaseOptions) DatabaseOptions + type ETag = string + type ErrConcurrency struct + func (e *ErrConcurrency) Error() string + func (e *ErrConcurrency) Is(target error) bool + type ErrInvalid struct + Message string + func (e *ErrInvalid) Error() string + func (e *ErrInvalid) Is(target error) bool + type ErrNotFound struct + ID string + func (e *ErrNotFound) Error() string + func (e *ErrNotFound) Is(target error) bool + type GetOptions interface + type Metadata struct + ETag ETag + ID string + type MockClient struct + func NewMockClient(ctrl *gomock.Controller) *MockClient + func (m *MockClient) Delete(arg0 context.Context, arg1 string, arg2 ...DeleteOptions) error + func (m *MockClient) EXPECT() *MockClientMockRecorder + func (m *MockClient) Get(arg0 context.Context, arg1 string, arg2 ...GetOptions) (*Object, error) + func (m *MockClient) Query(arg0 context.Context, arg1 Query, arg2 ...QueryOptions) (*ObjectQueryResult, error) + func (m *MockClient) Save(arg0 context.Context, arg1 *Object, arg2 ...SaveOptions) error + type MockClientDeleteCall struct + func (c *MockClientDeleteCall) Do(f func(context.Context, string, ...DeleteOptions) error) *MockClientDeleteCall + func (c *MockClientDeleteCall) DoAndReturn(f func(context.Context, string, ...DeleteOptions) error) *MockClientDeleteCall + func (c *MockClientDeleteCall) Return(arg0 error) *MockClientDeleteCall + type MockClientGetCall struct + func (c *MockClientGetCall) Do(f func(context.Context, string, ...GetOptions) (*Object, error)) *MockClientGetCall + func (c *MockClientGetCall) DoAndReturn(f func(context.Context, string, ...GetOptions) (*Object, error)) *MockClientGetCall + func (c *MockClientGetCall) Return(arg0 *Object, arg1 error) *MockClientGetCall + type MockClientMockRecorder struct + func (mr *MockClientMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockClientDeleteCall + func (mr *MockClientMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockClientGetCall + func (mr *MockClientMockRecorder) Query(arg0, arg1 any, arg2 ...any) *MockClientQueryCall + func (mr *MockClientMockRecorder) Save(arg0, arg1 any, arg2 ...any) *MockClientSaveCall + type MockClientQueryCall struct + func (c *MockClientQueryCall) Do(f func(context.Context, Query, ...QueryOptions) (*ObjectQueryResult, error)) *MockClientQueryCall + func (c *MockClientQueryCall) DoAndReturn(f func(context.Context, Query, ...QueryOptions) (*ObjectQueryResult, error)) *MockClientQueryCall + func (c *MockClientQueryCall) Return(arg0 *ObjectQueryResult, arg1 error) *MockClientQueryCall + type MockClientSaveCall struct + func (c *MockClientSaveCall) Do(f func(context.Context, *Object, ...SaveOptions) error) *MockClientSaveCall + func (c *MockClientSaveCall) DoAndReturn(f func(context.Context, *Object, ...SaveOptions) error) *MockClientSaveCall + func (c *MockClientSaveCall) Return(arg0 error) *MockClientSaveCall + type MutatingOptions interface + func WithETag(etag ETag) MutatingOptions + type Object struct + Data any + func (o *Object) As(out any) error + func (o *Object) DeepCopy() (*Object, error) + func (o Object) MatchesFilters(filters []QueryFilter) (bool, error) + type ObjectQueryResult struct + Items []Object + PaginationToken string + type Query struct + Filters []QueryFilter + IsScopeQuery bool + ResourceType string + RootScope string + RoutingScopePrefix string + ScopeRecursive bool + func (q Query) Validate() error + type QueryFilter struct + Field string + Value string + func (f QueryFilter) Validate() error + type QueryOptions interface + ApplyQueryOption func(DatabaseOptions) DatabaseOptions + func WithMaxQueryItemCount(maxcnt int) QueryOptions + func WithPaginationToken(token string) QueryOptions + type SaveOptions interface + ApplySaveOption func(DatabaseOptions) DatabaseOptions v0.42.0-rc2 Jan 8, 2025 v0.42.0-rc1 Jan 2, 2025