template

package
v0.0.0-...-4c964c4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

WireSet provides a wire set for this package.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(
	authorizer authz.Authorizer,
	templateStore store.TemplateStore,
	spaceStore store.SpaceStore,
) *Controller

func ProvideController

func ProvideController(
	templateStore store.TemplateStore,
	authorizer authz.Authorizer,
	spaceStore store.SpaceStore,
) *Controller

func (*Controller) Create

func (c *Controller) Create(ctx context.Context, session *auth.Session, in *CreateInput) (*types.Template, error)

func (*Controller) Delete

func (c *Controller) Delete(
	ctx context.Context,
	session *auth.Session,
	spaceRef string,
	identifier string,
	resolverType enum.ResolverType,
) error

func (*Controller) Find

func (c *Controller) Find(
	ctx context.Context,
	session *auth.Session,
	spaceRef string,
	identifier string,
	resolverType enum.ResolverType,
) (*types.Template, error)

func (*Controller) Update

func (c *Controller) Update(
	ctx context.Context,
	session *auth.Session,
	spaceRef string,
	identifier string,
	resolverType enum.ResolverType,
	in *UpdateInput,
) (*types.Template, error)

type CreateInput

type CreateInput struct {
	Description string `json:"description"`
	SpaceRef    string `json:"space_ref"` // Ref of the parent space
	// TODO [CODE-1363]: remove after identifier migration.
	UID        string `json:"uid" deprecated:"true"`
	Identifier string `json:"identifier"`
	Data       string `json:"data"`
}

type UpdateInput

type UpdateInput struct {
	// TODO [CODE-1363]: remove after identifier migration.
	UID         *string `json:"uid" deprecated:"true"`
	Identifier  *string `json:"identifier"`
	Description *string `json:"description"`
	Data        *string `json:"data"`
}

UpdateInput is used for updating a template.

Jump to

Keyboard shortcuts

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