Documentation ¶
Index ¶
- func NewConverter() *converter
- func NewRepository(conv constraintReferenceConverter) *repository
- func NewService(repo formationTemplateConstraintReferenceRepository, ...) *service
- type Entity
- type EntityCollection
- type Resolver
- func (r *Resolver) AttachConstraintToFormationTemplate(ctx context.Context, constraintID, formationTemplateID string) (*graphql.ConstraintReference, error)
- func (r *Resolver) DetachConstraintFromFormationTemplate(ctx context.Context, constraintID, formationTemplateID string) (*graphql.ConstraintReference, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConverter ¶
func NewConverter() *converter
NewConverter creates a new formationTemplate-constraint references converter
func NewRepository ¶
func NewRepository(conv constraintReferenceConverter) *repository
NewRepository creates a new FormationTemplateConstraintReference repository
func NewService ¶
func NewService(repo formationTemplateConstraintReferenceRepository, converter constraintReferenceConverter) *service
NewService creates a FormationTemplateConstraintReference service
Types ¶
type Entity ¶
type Entity struct { ConstraintID string `db:"formation_constraint_id"` FormationTemplateID string `db:"formation_template_id"` }
Entity represents the formation constraint entity
type EntityCollection ¶
type EntityCollection []*Entity
EntityCollection is a collection of formationTemplate-constraint references entities.
func (EntityCollection) Len ¶
func (s EntityCollection) Len() int
Len is implementation of a repo.Collection interface
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver is the FormationConstraint resolver
func NewResolver ¶
func NewResolver(transact persistence.Transactioner, converter constraintReferenceConverter, svc constraintReferenceService) *Resolver
NewResolver creates FormationConstraint resolver
func (*Resolver) AttachConstraintToFormationTemplate ¶
func (r *Resolver) AttachConstraintToFormationTemplate(ctx context.Context, constraintID, formationTemplateID string) (*graphql.ConstraintReference, error)
AttachConstraintToFormationTemplate creates a FormationTemplateConstraintReference using `in`
func (*Resolver) DetachConstraintFromFormationTemplate ¶
func (r *Resolver) DetachConstraintFromFormationTemplate(ctx context.Context, constraintID, formationTemplateID string) (*graphql.ConstraintReference, error)
DetachConstraintFromFormationTemplate deletes the FormationTemplateConstraintReference matching ID `id`