Documentation
¶
Index ¶
- type CreateOption
- func WithCreateChildID(id int64) CreateOption
- func WithCreateFields(fielder shared.Fielder, md model.ObjectMetadatter, ...) CreateOption
- func WithCreateIDs(ids []int64) CreateOption
- func WithCreateOverrideUserID(overrideID int64) CreateOption
- func WithCreateParentID(id int64) CreateOption
- func WithCreateTime(t time.Time) CreateOption
- type CreateOptions
- func (s *CreateOptions) CurrentTime() time.Time
- func (s *CreateOptions) GetAuthOpts() auth.Auther
- func (s *CreateOptions) GetChildID() int64
- func (s *CreateOptions) GetDerivedSearchOpts() map[string]*options.Searcher
- func (s *CreateOptions) GetFields() []string
- func (s *CreateOptions) GetIDs() []int64
- func (s *CreateOptions) GetParentID() int64
- func (s *CreateOptions) GetUnknownFields() []string
- func (s *CreateOptions) RequestTime() time.Time
- func (s *CreateOptions) SetAuthOpts(a auth.Auther) *CreateOptions
- type Creator
- type DeleteOption
- func WithDeleteFields(fielder shared.Fielder, md model.ObjectMetadatter, ...) DeleteOption
- func WithDeleteID(id int64) DeleteOption
- func WithDeleteIDs(ids []int64) DeleteOption
- func WithDeleteIDsAsEtags(tag etag.EtagType, etags ...string) DeleteOption
- func WithDeleteParentID(id int64) DeleteOption
- func WithDeleteParentIDAsEtag(etagType etag.EtagType, tag string) DeleteOption
- type DeleteOptions
- func (s *DeleteOptions) AddFilter(f string)
- func (s *DeleteOptions) GetAuthOpts() auth.Auther
- func (s *DeleteOptions) GetFields() []string
- func (s *DeleteOptions) GetFilter(f string) []util.FilterExpr
- func (s *DeleteOptions) GetFilters() []string
- func (s *DeleteOptions) GetIDs() []int64
- func (s *DeleteOptions) GetParentID() int64
- func (s *DeleteOptions) RemoveFilter(f string)
- func (s *DeleteOptions) RequestTime() time.Time
- type Filterer
- type Pager
- type SearchOption
- func WithFields(fielder shared.Fielder, md model.ObjectMetadatter, ...) SearchOption
- func WithFilters(filters []string) SearchOption
- func WithFiltersV1(env *cel.Env, query string) SearchOption
- func WithID(id int64) SearchOption
- func WithIDs(ids []int64) SearchOption
- func WithIDsAsEtags(tag etag.EtagType, etags ...string) SearchOption
- func WithPagination(pager Pager) SearchOption
- func WithQin(qin string) SearchOption
- func WithSearch(searcher Searcher) SearchOption
- func WithSearchAsParam(query string) SearchOption
- func WithSort(sorter Sorter) SearchOption
- type SearchOptions
- func (s *SearchOptions) AddCustomContext(key string, value any)
- func (s *SearchOptions) AddFilter(f string)
- func (s *SearchOptions) GetAuthOpts() auth.Auther
- func (s *SearchOptions) GetCustomContext() map[string]any
- func (s *SearchOptions) GetFields() []string
- func (s *SearchOptions) GetFilter(f string) []util.FilterExpr
- func (s *SearchOptions) GetFilters() []stringdeprecated
- func (s *SearchOptions) GetFiltersV1() *filters.FilterExpr
- func (s *SearchOptions) GetIDs() []int64
- func (s *SearchOptions) GetPage() int
- func (s *SearchOptions) GetQin() string
- func (s *SearchOptions) GetSearch() string
- func (s *SearchOptions) GetSize() int
- func (s *SearchOptions) GetSort() string
- func (s *SearchOptions) GetUnknownFields() []string
- func (s *SearchOptions) RequestTime() time.Time
- type Searcher
- type Sorter
- type UpdateMasker
- type UpdateOption
- func WithUpdateEtag(etags ...*etag.Tid) UpdateOption
- func WithUpdateFields(fielder shared.Fielder, md model.ObjectMetadatter, ...) UpdateOption
- func WithUpdateIDs(ids []int64) UpdateOption
- func WithUpdateMasker(m UpdateMasker) UpdateOption
- func WithUpdateOverrideUserID(overrideID int64) UpdateOption
- func WithUpdateParentID(parentID int64) UpdateOption
- func WithUpdateTime(t time.Time) UpdateOption
- type UpdateOptions
- func (s *UpdateOptions) GetAuthOpts() auth.Auther
- func (s *UpdateOptions) GetDerivedSearchOpts() map[string]*options.Searcher
- func (s *UpdateOptions) GetEtags() []*etag.Tid
- func (s *UpdateOptions) GetFields() []string
- func (s *UpdateOptions) GetIDs() []int64
- func (s *UpdateOptions) GetMask() []string
- func (s *UpdateOptions) GetParentID() int64
- func (s *UpdateOptions) GetUnknownFields() []string
- func (s *UpdateOptions) RequestTime() time.Time
- func (s *UpdateOptions) SetAuthOpts(auth auth.Auther) *UpdateOptions
- func (s *UpdateOptions) SetDerivedSearchOpts(opts map[string]*options.Searcher) *UpdateOptions
- func (s *UpdateOptions) SetEtags(etags ...*etag.Tid) *UpdateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOption ¶
type CreateOption func(*CreateOptions) error
func WithCreateChildID ¶
func WithCreateChildID(id int64) CreateOption
func WithCreateFields ¶
func WithCreateFields( fielder shared.Fielder, md model.ObjectMetadatter, fieldsModifiers ...func(fields []string) []string, ) CreateOption
func WithCreateIDs ¶
func WithCreateIDs(ids []int64) CreateOption
func WithCreateOverrideUserID ¶
func WithCreateOverrideUserID(overrideID int64) CreateOption
func WithCreateParentID ¶
func WithCreateParentID(id int64) CreateOption
func WithCreateTime ¶
func WithCreateTime(t time.Time) CreateOption
type CreateOptions ¶
type CreateOptions struct {
context.Context
Time time.Time
Fields []string
DerivedSearchOpts map[string]*options.Searcher
UnknownFields []string
IDs []int64
ParentID int64
ChildID int64
Auth auth.Auther
}
func NewCreateOptions ¶
func NewCreateOptions(ctx context.Context, opts ...CreateOption) (*CreateOptions, error)
func (*CreateOptions) CurrentTime ¶
func (s *CreateOptions) CurrentTime() time.Time
func (*CreateOptions) GetAuthOpts ¶
func (s *CreateOptions) GetAuthOpts() auth.Auther
func (*CreateOptions) GetChildID ¶
func (s *CreateOptions) GetChildID() int64
func (*CreateOptions) GetDerivedSearchOpts ¶
func (s *CreateOptions) GetDerivedSearchOpts() map[string]*options.Searcher
func (*CreateOptions) GetFields ¶
func (s *CreateOptions) GetFields() []string
func (*CreateOptions) GetIDs ¶
func (s *CreateOptions) GetIDs() []int64
func (*CreateOptions) GetParentID ¶
func (s *CreateOptions) GetParentID() int64
func (*CreateOptions) GetUnknownFields ¶
func (s *CreateOptions) GetUnknownFields() []string
func (*CreateOptions) RequestTime ¶
func (s *CreateOptions) RequestTime() time.Time
func (*CreateOptions) SetAuthOpts ¶
func (s *CreateOptions) SetAuthOpts(a auth.Auther) *CreateOptions
type DeleteOption ¶
type DeleteOption func(options *DeleteOptions) error
func WithDeleteFields ¶
func WithDeleteFields(fielder shared.Fielder, md model.ObjectMetadatter, fieldModifiers ...func(in []string) []string) DeleteOption
func WithDeleteID ¶
func WithDeleteID(id int64) DeleteOption
func WithDeleteIDs ¶
func WithDeleteIDs(ids []int64) DeleteOption
func WithDeleteIDsAsEtags ¶
func WithDeleteIDsAsEtags(tag etag.EtagType, etags ...string) DeleteOption
func WithDeleteParentID ¶
func WithDeleteParentID(id int64) DeleteOption
func WithDeleteParentIDAsEtag ¶
func WithDeleteParentIDAsEtag(etagType etag.EtagType, tag string) DeleteOption
type DeleteOptions ¶
type DeleteOptions struct {
context.Context
IDs []int64
ParentID int64
Auth auth.Auther
Filters []string
Fields []string
// contains filtered or unexported fields
}
func NewDeleteOptions ¶
func NewDeleteOptions(ctx context.Context, opts ...DeleteOption) (*DeleteOptions, error)
NewDeleteOptions initializes a DeleteOptions instance with the current session, context, and current time.
func (*DeleteOptions) AddFilter ¶
func (s *DeleteOptions) AddFilter(f string)
func (*DeleteOptions) GetAuthOpts ¶
func (s *DeleteOptions) GetAuthOpts() auth.Auther
func (*DeleteOptions) GetFields ¶
func (s *DeleteOptions) GetFields() []string
func (*DeleteOptions) GetFilter ¶
func (s *DeleteOptions) GetFilter(f string) []util.FilterExpr
func (*DeleteOptions) GetFilters ¶
func (s *DeleteOptions) GetFilters() []string
func (*DeleteOptions) GetIDs ¶
func (s *DeleteOptions) GetIDs() []int64
func (*DeleteOptions) GetParentID ¶
func (s *DeleteOptions) GetParentID() int64
func (*DeleteOptions) RemoveFilter ¶
func (s *DeleteOptions) RemoveFilter(f string)
func (*DeleteOptions) RequestTime ¶
func (s *DeleteOptions) RequestTime() time.Time
type SearchOption ¶
type SearchOption func(options *SearchOptions) error
func WithFields ¶
func WithFields(fielder shared.Fielder, md model.ObjectMetadatter, fieldModifiers ...func(in []string) []string) SearchOption
func WithFilters ¶
func WithFilters(filters []string) SearchOption
func WithFiltersV1 ¶
func WithFiltersV1(env *cel.Env, query string) SearchOption
func WithID ¶
func WithID(id int64) SearchOption
func WithIDs ¶
func WithIDs(ids []int64) SearchOption
func WithIDsAsEtags ¶
func WithIDsAsEtags(tag etag.EtagType, etags ...string) SearchOption
func WithPagination ¶
func WithPagination(pager Pager) SearchOption
func WithQin ¶
func WithQin(qin string) SearchOption
func WithSearch ¶
func WithSearch(searcher Searcher) SearchOption
func WithSearchAsParam ¶
func WithSearchAsParam(query string) SearchOption
func WithSort ¶
func WithSort(sorter Sorter) SearchOption
type SearchOptions ¶
type SearchOptions struct {
context.Context
// filters
IDs []int64
// Deprecated: use FiltersV1
Filters []string
FiltersV1 *filters.FilterExpr
// search
Search string
// output
Fields []string
UnknownFields []string
CustomContext map[string]any
// paging
Page int
Size int
Sort string
// Auth opts
Auth auth.Auther
Qin string
// contains filtered or unexported fields
}
func NewLocateOptions ¶
func NewLocateOptions(ctx context.Context, opts ...SearchOption) (*SearchOptions, error)
func NewSearchOptions ¶
func NewSearchOptions(ctx context.Context, opts ...SearchOption) (*SearchOptions, error)
func (*SearchOptions) AddCustomContext ¶
func (s *SearchOptions) AddCustomContext(key string, value any)
func (*SearchOptions) AddFilter ¶
func (s *SearchOptions) AddFilter(f string)
func (*SearchOptions) GetAuthOpts ¶
func (s *SearchOptions) GetAuthOpts() auth.Auther
func (*SearchOptions) GetCustomContext ¶
func (s *SearchOptions) GetCustomContext() map[string]any
func (*SearchOptions) GetFields ¶
func (s *SearchOptions) GetFields() []string
func (*SearchOptions) GetFilter ¶
func (s *SearchOptions) GetFilter(f string) []util.FilterExpr
Deprecated GetFilter returns all filters for a given field, with operator and value
func (*SearchOptions) GetFilters
deprecated
func (s *SearchOptions) GetFilters() []string
Deprecated: use GetFiltersV1
func (*SearchOptions) GetFiltersV1 ¶
func (s *SearchOptions) GetFiltersV1() *filters.FilterExpr
func (*SearchOptions) GetIDs ¶
func (s *SearchOptions) GetIDs() []int64
func (*SearchOptions) GetPage ¶
func (s *SearchOptions) GetPage() int
func (*SearchOptions) GetQin ¶
func (s *SearchOptions) GetQin() string
func (*SearchOptions) GetSearch ¶
func (s *SearchOptions) GetSearch() string
func (*SearchOptions) GetSize ¶
func (s *SearchOptions) GetSize() int
func (*SearchOptions) GetSort ¶
func (s *SearchOptions) GetSort() string
func (*SearchOptions) GetUnknownFields ¶
func (s *SearchOptions) GetUnknownFields() []string
func (*SearchOptions) RequestTime ¶
func (s *SearchOptions) RequestTime() time.Time
type UpdateMasker ¶
type UpdateMasker interface {
GetXJsonMask() []string
}
type UpdateOption ¶
type UpdateOption func(*UpdateOptions) error
func WithUpdateEtag ¶
func WithUpdateEtag(etags ...*etag.Tid) UpdateOption
WithUpdateEtag adds an etag to the UpdateOptions
func WithUpdateFields ¶
func WithUpdateFields( fielder shared.Fielder, md model.ObjectMetadatter, fieldsModifiers ...func(fields []string) []string, ) UpdateOption
func WithUpdateIDs ¶
func WithUpdateIDs(ids []int64) UpdateOption
func WithUpdateMasker ¶
func WithUpdateMasker(m UpdateMasker) UpdateOption
func WithUpdateOverrideUserID ¶
func WithUpdateOverrideUserID(overrideID int64) UpdateOption
func WithUpdateParentID ¶
func WithUpdateParentID(parentID int64) UpdateOption
func WithUpdateTime ¶
func WithUpdateTime(t time.Time) UpdateOption
type UpdateOptions ¶
type UpdateOptions struct {
context.Context
Time time.Time
Fields []string
UnknownFields []string
DerivedSearchOpts map[string]*options.Searcher
Mask []string
Auth auth.Auther
ParentID int64
IDs []int64
}
func NewUpdateOptions ¶
func NewUpdateOptions(ctx context.Context, opts ...UpdateOption) (*UpdateOptions, error)
func (*UpdateOptions) GetAuthOpts ¶
func (s *UpdateOptions) GetAuthOpts() auth.Auther
func (*UpdateOptions) GetDerivedSearchOpts ¶
func (s *UpdateOptions) GetDerivedSearchOpts() map[string]*options.Searcher
func (*UpdateOptions) GetEtags ¶
func (s *UpdateOptions) GetEtags() []*etag.Tid
func (*UpdateOptions) GetFields ¶
func (s *UpdateOptions) GetFields() []string
func (*UpdateOptions) GetIDs ¶
func (s *UpdateOptions) GetIDs() []int64
func (*UpdateOptions) GetMask ¶
func (s *UpdateOptions) GetMask() []string
func (*UpdateOptions) GetParentID ¶
func (s *UpdateOptions) GetParentID() int64
func (*UpdateOptions) GetUnknownFields ¶
func (s *UpdateOptions) GetUnknownFields() []string
func (*UpdateOptions) RequestTime ¶
func (s *UpdateOptions) RequestTime() time.Time
func (*UpdateOptions) SetAuthOpts ¶
func (s *UpdateOptions) SetAuthOpts(auth auth.Auther) *UpdateOptions
func (*UpdateOptions) SetDerivedSearchOpts ¶
func (s *UpdateOptions) SetDerivedSearchOpts(opts map[string]*options.Searcher) *UpdateOptions
func (*UpdateOptions) SetEtags ¶
func (s *UpdateOptions) SetEtags(etags ...*etag.Tid) *UpdateOptions
Click to show internal directories.
Click to hide internal directories.