store

package
v0.0.0-...-7b34d14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func IsResourceNotFound(err error) bool

func IsResourcePreconditionFailed

func IsResourcePreconditionFailed(err error) bool

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 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

type DeleteOptions struct {
	Name string
	Mesh string
}

func NewDeleteOptions

func NewDeleteOptions(fs ...DeleteOptionsFunc) *DeleteOptions

type DeleteOptionsFunc

type DeleteOptionsFunc func(*DeleteOptions)

func DeleteByKey

func DeleteByKey(name, mesh string) DeleteOptionsFunc

type GetOptions

type GetOptions struct {
	Name    string
	Mesh    string
	Version string
}

func NewGetOptions

func NewGetOptions(fs ...GetOptionsFunc) *GetOptions

func (*GetOptions) HashCode

func (g *GetOptions) HashCode() string

type GetOptionsFunc

type GetOptionsFunc func(*GetOptions)

func GetByKey

func GetByKey(name, mesh string) GetOptionsFunc

func GetByVersion

func GetByVersion(version string) GetOptionsFunc

type ListOptions

type ListOptions struct {
	Mesh       string
	PageSize   int
	PageOffset string
}

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 UpdateOptions

type UpdateOptions struct {
	ModificationTime time.Time
}

func NewUpdateOptions

func NewUpdateOptions(fs ...UpdateOptionsFunc) *UpdateOptions

type UpdateOptionsFunc

type UpdateOptionsFunc func(*UpdateOptions)

func ModifiedAt

func ModifiedAt(modificationTime time.Time) UpdateOptionsFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL