Documentation ¶
Index ¶
- Variables
- func ErrorResourceAlreadyExists(rt model.ResourceType, name, mesh string) error
- func ErrorResourceConflict(rt model.ResourceType, name, mesh string) error
- func ErrorResourceNotFound(rt model.ResourceType, name, mesh string) error
- func ErrorResourcePreconditionFailed(rt model.ResourceType, name, mesh string) error
- func IsResourceNotFound(err error) bool
- func IsResourcePreconditionFailed(err error) bool
- type ClosableResourceStore
- type CreateOptions
- type CreateOptionsFunc
- type DeleteAllOptions
- type DeleteAllOptionsFunc
- type DeleteOptions
- type DeleteOptionsFunc
- type GetOptions
- type GetOptionsFunc
- type ListOptions
- type ListOptionsFunc
- type ResourceStore
- type UpdateOptions
- type UpdateOptionsFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorInvalidOffset = errors.New("invalid offset")
Functions ¶
func ErrorResourceAlreadyExists ¶
func ErrorResourceAlreadyExists(rt model.ResourceType, name, mesh string) error
func ErrorResourceConflict ¶
func ErrorResourceConflict(rt model.ResourceType, name, mesh string) error
func ErrorResourceNotFound ¶
func ErrorResourceNotFound(rt model.ResourceType, name, mesh string) error
func ErrorResourcePreconditionFailed ¶
func ErrorResourcePreconditionFailed(rt model.ResourceType, name, mesh string) error
func IsResourceNotFound ¶
Types ¶
type ClosableResourceStore ¶
type ClosableResourceStore interface { ResourceStore io.Closer }
func NewStrictResourceStore ¶
func NewStrictResourceStore(c ResourceStore) ClosableResourceStore
type CreateOptions ¶
type CreateOptions struct { Name string Mesh string CreationTime time.Time Owner core_model.Resource }
func NewCreateOptions ¶
func NewCreateOptions(fs ...CreateOptionsFunc) *CreateOptions
type CreateOptionsFunc ¶
type CreateOptionsFunc func(*CreateOptions)
func CreateBy ¶
func CreateBy(key core_model.ResourceKey) CreateOptionsFunc
func CreateByKey ¶
func CreateByKey(name, mesh string) CreateOptionsFunc
func CreateWithOwner ¶
func CreateWithOwner(owner core_model.Resource) CreateOptionsFunc
func CreatedAt ¶
func CreatedAt(creationTime time.Time) CreateOptionsFunc
type DeleteAllOptions ¶
type DeleteAllOptions struct {
Mesh string
}
func NewDeleteAllOptions ¶
func NewDeleteAllOptions(fs ...DeleteAllOptionsFunc) *DeleteAllOptions
type DeleteAllOptionsFunc ¶
type DeleteAllOptionsFunc func(*DeleteAllOptions)
func DeleteAllByMesh ¶
func DeleteAllByMesh(mesh string) DeleteAllOptionsFunc
type DeleteOptions ¶
func NewDeleteOptions ¶
func NewDeleteOptions(fs ...DeleteOptionsFunc) *DeleteOptions
type DeleteOptionsFunc ¶
type DeleteOptionsFunc func(*DeleteOptions)
func DeleteBy ¶
func DeleteBy(key core_model.ResourceKey) DeleteOptionsFunc
func DeleteByKey ¶
func DeleteByKey(name, mesh string) DeleteOptionsFunc
type GetOptions ¶
func NewGetOptions ¶
func NewGetOptions(fs ...GetOptionsFunc) *GetOptions
func (*GetOptions) HashCode ¶
func (g *GetOptions) HashCode() string
type GetOptionsFunc ¶
type GetOptionsFunc func(*GetOptions)
func GetBy ¶
func GetBy(key core_model.ResourceKey) GetOptionsFunc
func GetByKey ¶
func GetByKey(name, mesh string) GetOptionsFunc
func GetByVersion ¶
func GetByVersion(version string) GetOptionsFunc
type ListOptions ¶
func NewListOptions ¶
func NewListOptions(fs ...ListOptionsFunc) *ListOptions
func (*ListOptions) HashCode ¶
func (l *ListOptions) HashCode() string
type ListOptionsFunc ¶
type ListOptionsFunc func(*ListOptions)
func ListByMesh ¶
func ListByMesh(mesh string) ListOptionsFunc
func ListByPage ¶
func ListByPage(size int, offset string) ListOptionsFunc
type ResourceStore ¶
type ResourceStore interface { Create(context.Context, model.Resource, ...CreateOptionsFunc) error Update(context.Context, model.Resource, ...UpdateOptionsFunc) error Delete(context.Context, model.Resource, ...DeleteOptionsFunc) error Get(context.Context, model.Resource, ...GetOptionsFunc) error List(context.Context, model.ResourceList, ...ListOptionsFunc) error }
func NewCustomizableResourceStore ¶
func NewCustomizableResourceStore(defaultStore ResourceStore, customStores map[model.ResourceType]ResourceStore) ResourceStore
type UpdateOptions ¶
func NewUpdateOptions ¶
func NewUpdateOptions(fs ...UpdateOptionsFunc) *UpdateOptions
type UpdateOptionsFunc ¶
type UpdateOptionsFunc func(*UpdateOptions)
func ModifiedAt ¶
func ModifiedAt(modificationTime time.Time) UpdateOptionsFunc
Click to show internal directories.
Click to hide internal directories.