runtime

package
v0.0.0-...-ecc6c17 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 AuthConverter

type AuthConverter interface {
	ToGraphQL(in *model.Auth) *graphql.Auth
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(svc RuntimeService, conv RuntimeConverter) *Resolver

func (*Resolver) AddRuntimeAnnotation

func (r *Resolver) AddRuntimeAnnotation(ctx context.Context, runtimeID string, key string, value interface{}) (*graphql.Annotation, error)

func (*Resolver) AddRuntimeLabel

func (r *Resolver) AddRuntimeLabel(ctx context.Context, runtimeID string, key string, values []string) (*graphql.Label, error)

func (*Resolver) CreateRuntime

func (r *Resolver) CreateRuntime(ctx context.Context, in graphql.RuntimeInput) (*graphql.Runtime, error)

func (*Resolver) DeleteRuntime

func (r *Resolver) DeleteRuntime(ctx context.Context, id string) (*graphql.Runtime, error)

func (*Resolver) DeleteRuntimeAnnotation

func (r *Resolver) DeleteRuntimeAnnotation(ctx context.Context, runtimeID string, key string) (*graphql.Annotation, error)

func (*Resolver) DeleteRuntimeLabel

func (r *Resolver) DeleteRuntimeLabel(ctx context.Context, runtimeID string, key string, values []string) (*graphql.Label, error)

func (*Resolver) Runtime

func (r *Resolver) Runtime(ctx context.Context, id string) (*graphql.Runtime, error)

func (*Resolver) Runtimes

func (r *Resolver) Runtimes(ctx context.Context, filter []*graphql.LabelFilter, first *int, after *graphql.PageCursor) (*graphql.RuntimePage, error)

func (*Resolver) UpdateRuntime

func (r *Resolver) UpdateRuntime(ctx context.Context, id string, in graphql.RuntimeInput) (*graphql.Runtime, error)

type RuntimeConverter

type RuntimeConverter interface {
	ToGraphQL(in *model.Runtime) *graphql.Runtime
	MultipleToGraphQL(in []*model.Runtime) []*graphql.Runtime
	InputFromGraphQL(in graphql.RuntimeInput) model.RuntimeInput
}

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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