eventapi

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConverter

func NewConverter(fr FetchRequestConverter, vc VersionConverter) *converter

func NewRepository

func NewRepository() *inMemoryRepository

func NewService

func NewService(repo EventAPIRepository, uidService api.UIDService) *service

Types

type EventAPIConverter

type EventAPIConverter interface {
	ToGraphQL(in *model.EventAPIDefinition) *graphql.EventAPIDefinition
	MultipleToGraphQL(in []*model.EventAPIDefinition) []*graphql.EventAPIDefinition
	MultipleInputFromGraphQL(in []*graphql.EventAPIDefinitionInput) []*model.EventAPIDefinitionInput
	InputFromGraphQL(in *graphql.EventAPIDefinitionInput) *model.EventAPIDefinitionInput
}

type EventAPIRepository

type EventAPIRepository interface {
	GetByID(id string) (*model.EventAPIDefinition, error)
	List(filter []*labelfilter.LabelFilter, pageSize *int, cursor *string) (*model.EventAPIDefinitionPage, error)
	ListByApplicationID(applicationID string, pageSize *int, cursor *string) (*model.EventAPIDefinitionPage, error)
	Create(item *model.EventAPIDefinition) error
	CreateMany(items []*model.EventAPIDefinition) error
	Update(item *model.EventAPIDefinition) error
	Delete(item *model.EventAPIDefinition) error
	DeleteAllByApplicationID(id string) error
}

type EventAPIService

type EventAPIService interface {
	Create(ctx context.Context, applicationID string, in model.EventAPIDefinitionInput) (string, error)
	Update(ctx context.Context, id string, in model.EventAPIDefinitionInput) error
	Get(ctx context.Context, id string) (*model.EventAPIDefinition, error)
	Delete(ctx context.Context, id string) error
	RefetchAPISpec(ctx context.Context, id string) (*model.EventAPISpec, error)
}

type FetchRequestConverter

type FetchRequestConverter interface {
	ToGraphQL(in *model.FetchRequest) *graphql.FetchRequest
	InputFromGraphQL(in *graphql.FetchRequestInput) *model.FetchRequestInput
}

type Resolver

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

func NewResolver

func NewResolver(svc EventAPIService, converter EventAPIConverter) *Resolver

func (*Resolver) AddEventAPI

func (r *Resolver) AddEventAPI(ctx context.Context, applicationID string, in graphql.EventAPIDefinitionInput) (*graphql.EventAPIDefinition, error)

func (*Resolver) DeleteEventAPI

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

func (*Resolver) RefetchEventAPISpec

func (r *Resolver) RefetchEventAPISpec(ctx context.Context, eventID string) (*graphql.EventAPISpec, error)

func (*Resolver) UpdateEventAPI

type UIDService

type UIDService interface {
	Generate() string
}

type VersionConverter

type VersionConverter interface {
	ToGraphQL(in *model.Version) *graphql.Version
	InputFromGraphQL(in *graphql.VersionInput) *model.VersionInput
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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