Documentation ¶
Index ¶
- func NewConverter() *converter
- func NewRepository(conv EntityConverter) *repository
- func NewSchemaForFormations(formations []string) (interface{}, error)
- func NewService(repo Repository, labelRepo LabelRepository, ...) *service
- func ParseFormationsFromSchema(schema *interface{}) ([]string, error)
- type Entity
- type EntityCollection
- type EntityConverter
- type LabelRepository
- type ModelConverter
- type Repository
- type Resolver
- func (r *Resolver) CreateLabelDefinition(ctx context.Context, in graphql.LabelDefinitionInput) (*graphql.LabelDefinition, error)
- func (r *Resolver) LabelDefinition(ctx context.Context, key string) (*graphql.LabelDefinition, error)
- func (r *Resolver) LabelDefinitions(ctx context.Context) ([]*graphql.LabelDefinition, error)
- func (r *Resolver) UpdateLabelDefinition(ctx context.Context, in graphql.LabelDefinitionInput) (*graphql.LabelDefinition, error)
- type ScenarioAssignmentLister
- type Service
- type TenantRepository
- type UIDService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepository ¶
func NewRepository(conv EntityConverter) *repository
NewRepository missing godoc
func NewSchemaForFormations ¶
NewSchemaForFormations returns new scenario schema with the provided formations
func NewService ¶
func NewService(repo Repository, labelRepo LabelRepository, scenarioAssignmentLister ScenarioAssignmentLister, tenantRepo TenantRepository, uidService UIDService) *service
NewService creates new label definition service
func ParseFormationsFromSchema ¶
ParseFormationsFromSchema returns available scenarios from the provided schema
Types ¶
type Entity ¶
type Entity struct { ID string `db:"id"` TenantID string `db:"tenant_id"` Key string `db:"key"` SchemaJSON sql.NullString `db:"schema"` Version int `db:"version"` }
Entity missing godoc
type EntityConverter ¶
type EntityConverter interface { ToEntity(in model.LabelDefinition) (Entity, error) FromEntity(in Entity) (model.LabelDefinition, error) }
EntityConverter missing godoc
type LabelRepository ¶
type LabelRepository interface { GetByKey(ctx context.Context, tenant string, objectType model.LabelableObject, objectID, key string) (*model.Label, error) ListForObject(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string) (map[string]*model.Label, error) ListByKey(ctx context.Context, tenant, key string) ([]*model.Label, error) Delete(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, key string) error DeleteAll(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string) error DeleteByKey(ctx context.Context, tenant string, key string) error }
LabelRepository missing godoc
type ModelConverter ¶
type ModelConverter interface { // TODO: Use model.LabelDefinitionInput FromGraphQL(input graphql.LabelDefinitionInput, tenant string) (model.LabelDefinition, error) ToGraphQL(definition model.LabelDefinition) (graphql.LabelDefinition, error) }
ModelConverter missing godoc
type Repository ¶
type Repository interface { Create(ctx context.Context, def model.LabelDefinition) error Upsert(ctx context.Context, def model.LabelDefinition) error GetByKey(ctx context.Context, tenant string, key string) (*model.LabelDefinition, error) Update(ctx context.Context, def model.LabelDefinition) error Exists(ctx context.Context, tenant string, key string) (bool, error) List(ctx context.Context, tenant string) ([]model.LabelDefinition, error) }
Repository missing godoc
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver missing godoc
func NewResolver ¶
func NewResolver(transactioner persistence.Transactioner, srv Service, formationSvc formationService, conv ModelConverter) *Resolver
NewResolver missing godoc
func (*Resolver) CreateLabelDefinition ¶
func (r *Resolver) CreateLabelDefinition(ctx context.Context, in graphql.LabelDefinitionInput) (*graphql.LabelDefinition, error)
CreateLabelDefinition missing godoc
func (*Resolver) LabelDefinition ¶
func (r *Resolver) LabelDefinition(ctx context.Context, key string) (*graphql.LabelDefinition, error)
LabelDefinition missing godoc
func (*Resolver) LabelDefinitions ¶
LabelDefinitions missing godoc
func (*Resolver) UpdateLabelDefinition ¶
func (r *Resolver) UpdateLabelDefinition(ctx context.Context, in graphql.LabelDefinitionInput) (*graphql.LabelDefinition, error)
UpdateLabelDefinition missing godoc
type ScenarioAssignmentLister ¶
type ScenarioAssignmentLister interface {
List(ctx context.Context, tenant string, pageSize int, cursor string) (*model.AutomaticScenarioAssignmentPage, error)
}
ScenarioAssignmentLister missing godoc
type Service ¶
type Service interface { Get(ctx context.Context, tenant string, key string) (*model.LabelDefinition, error) List(ctx context.Context, tenant string) ([]model.LabelDefinition, error) }
Service missing godoc
type TenantRepository ¶
type TenantRepository interface {
Get(ctx context.Context, id string) (*model.BusinessTenantMapping, error)
}
TenantRepository missing godoc
Click to show internal directories.
Click to hide internal directories.