template

package
v0.0.0-...-b1a156a Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Zlib Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BucketName represents the name of the bucket where this service stores data.
	BucketName = "templates"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service represents a service for managing baask8s data.

func NewService

func NewService(db *bolt.DB) (*Service, error)

NewService creates a new instance of a service.

func (*Service) CreateTemplate

func (service *Service) CreateTemplate(template *baasapi.Template) error

CreateTemplate creates a new template.

func (*Service) DeleteTemplate

func (service *Service) DeleteTemplate(ID baasapi.TemplateID) error

DeleteTemplate deletes a template.

func (*Service) Template

func (service *Service) Template(ID baasapi.TemplateID) (*baasapi.Template, error)

Template returns a template by ID.

func (*Service) Templates

func (service *Service) Templates() ([]baasapi.Template, error)

Templates return an array containing all the templates.

func (*Service) UpdateTemplate

func (service *Service) UpdateTemplate(ID baasapi.TemplateID, template *baasapi.Template) error

UpdateTemplate saves a template.

Jump to

Keyboard shortcuts

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