Documentation
¶
Index ¶
- func NewConverter(fr FetchRequestConverter, vc VersionConverter) *converter
- func NewRepository() *inMemoryRepository
- func NewService(repo EventAPIRepository, uidService api.UIDService) *service
- type EventAPIConverter
- type EventAPIRepository
- type EventAPIService
- type FetchRequestConverter
- type Resolver
- func (r *Resolver) AddEventAPI(ctx context.Context, applicationID string, in graphql.EventAPIDefinitionInput) (*graphql.EventAPIDefinition, error)
- func (r *Resolver) DeleteEventAPI(ctx context.Context, id string) (*graphql.EventAPIDefinition, error)
- func (r *Resolver) RefetchEventAPISpec(ctx context.Context, eventID string) (*graphql.EventAPISpec, error)
- func (r *Resolver) UpdateEventAPI(ctx context.Context, id string, in graphql.EventAPIDefinitionInput) (*graphql.EventAPIDefinition, error)
- type UIDService
- type VersionConverter
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 (*Resolver) RefetchEventAPISpec ¶
func (*Resolver) UpdateEventAPI ¶
func (r *Resolver) UpdateEventAPI(ctx context.Context, id string, in graphql.EventAPIDefinitionInput) (*graphql.EventAPIDefinition, error)
type UIDService ¶
type UIDService interface {
Generate() string
}
type VersionConverter ¶
type VersionConverter interface { ToGraphQL(in *model.Version) *graphql.Version InputFromGraphQL(in *graphql.VersionInput) *model.VersionInput }
Click to show internal directories.
Click to hide internal directories.