Documentation
¶
Index ¶
- func NewConverter(auth AuthConverter) *converter
- func NewRepository() *inMemoryRepository
- func NewService(repo RuntimeRepository, uidService UIDService) *service
- type AuthConverter
- type Resolver
- func (r *Resolver) AddRuntimeAnnotation(ctx context.Context, runtimeID string, key string, value interface{}) (*graphql.Annotation, error)
- func (r *Resolver) AddRuntimeLabel(ctx context.Context, runtimeID string, key string, values []string) (*graphql.Label, error)
- func (r *Resolver) CreateRuntime(ctx context.Context, in graphql.RuntimeInput) (*graphql.Runtime, error)
- func (r *Resolver) DeleteRuntime(ctx context.Context, id string) (*graphql.Runtime, error)
- func (r *Resolver) DeleteRuntimeAnnotation(ctx context.Context, runtimeID string, key string) (*graphql.Annotation, error)
- func (r *Resolver) DeleteRuntimeLabel(ctx context.Context, runtimeID string, key string, values []string) (*graphql.Label, error)
- func (r *Resolver) Runtime(ctx context.Context, id string) (*graphql.Runtime, error)
- func (r *Resolver) Runtimes(ctx context.Context, filter []*graphql.LabelFilter, first *int, ...) (*graphql.RuntimePage, error)
- func (r *Resolver) UpdateRuntime(ctx context.Context, id string, in graphql.RuntimeInput) (*graphql.Runtime, error)
- type RuntimeConverter
- type RuntimeRepository
- type RuntimeService
- type UIDService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConverter ¶
func NewConverter(auth AuthConverter) *converter
func NewRepository ¶
func NewRepository() *inMemoryRepository
func NewService ¶
func NewService(repo RuntimeRepository, uidService UIDService) *service
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func NewResolver(svc RuntimeService, conv RuntimeConverter) *Resolver
func (*Resolver) AddRuntimeAnnotation ¶
func (*Resolver) AddRuntimeLabel ¶
func (*Resolver) CreateRuntime ¶
func (*Resolver) DeleteRuntime ¶
func (*Resolver) DeleteRuntimeAnnotation ¶
func (*Resolver) DeleteRuntimeLabel ¶
func (*Resolver) Runtimes ¶
func (r *Resolver) Runtimes(ctx context.Context, filter []*graphql.LabelFilter, first *int, after *graphql.PageCursor) (*graphql.RuntimePage, error)
type RuntimeConverter ¶
type RuntimeRepository ¶
type RuntimeRepository interface { GetByID(tenant, id string) (*model.Runtime, error) List(tenant string, filter []*labelfilter.LabelFilter, pageSize *int, cursor *string) (*model.RuntimePage, error) Create(item *model.Runtime) error Update(item *model.Runtime) error Delete(item *model.Runtime) error }
type RuntimeService ¶
type RuntimeService interface { Create(ctx context.Context, in model.RuntimeInput) (string, error) Update(ctx context.Context, id string, in model.RuntimeInput) error Get(ctx context.Context, id string) (*model.Runtime, error) Delete(ctx context.Context, id string) error List(ctx context.Context, filter []*labelfilter.LabelFilter, pageSize *int, cursor *string) (*model.RuntimePage, error) AddLabel(ctx context.Context, runtimeID string, key string, values []string) error DeleteLabel(ctx context.Context, runtimeID string, key string, values []string) error AddAnnotation(ctx context.Context, runtimeID string, key string, value interface{}) error DeleteAnnotation(ctx context.Context, runtimeID string, key string) error }
type UIDService ¶
type UIDService interface {
Generate() string
}
Click to show internal directories.
Click to hide internal directories.