Documentation ¶
Index ¶
- Constants
- type Service
- func (service *Service) BucketName() string
- func (service *Service) Create(customTemplate *portainer.CustomTemplate) error
- func (service *Service) CustomTemplate(ID portainer.CustomTemplateID) (*portainer.CustomTemplate, error)
- func (service *Service) CustomTemplates() ([]portainer.CustomTemplate, error)
- func (service *Service) DeleteCustomTemplate(ID portainer.CustomTemplateID) error
- func (service *Service) GetNextIdentifier() int
- func (service *Service) UpdateCustomTemplate(ID portainer.CustomTemplateID, customTemplate *portainer.CustomTemplate) error
Constants ¶
View Source
const (
// BucketName represents the name of the bucket where this service stores data.
BucketName = "customtemplates"
)
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 custom template data.
func NewService ¶
func NewService(connection portainer.Connection) (*Service, error)
NewService creates a new instance of a service.
func (*Service) BucketName ¶
func (*Service) Create ¶
func (service *Service) Create(customTemplate *portainer.CustomTemplate) error
CreateCustomTemplate uses the existing id and saves it. TODO: where does the ID come from, and is it safe?
func (*Service) CustomTemplate ¶
func (service *Service) CustomTemplate(ID portainer.CustomTemplateID) (*portainer.CustomTemplate, error)
CustomTemplate returns an custom template by ID.
func (*Service) CustomTemplates ¶
func (service *Service) CustomTemplates() ([]portainer.CustomTemplate, error)
CustomTemplates return an array containing all the custom templates.
func (*Service) DeleteCustomTemplate ¶
func (service *Service) DeleteCustomTemplate(ID portainer.CustomTemplateID) error
DeleteCustomTemplate deletes an custom template.
func (*Service) GetNextIdentifier ¶
GetNextIdentifier returns the next identifier for a custom template.
func (*Service) UpdateCustomTemplate ¶
func (service *Service) UpdateCustomTemplate(ID portainer.CustomTemplateID, customTemplate *portainer.CustomTemplate) error
UpdateCustomTemplate updates an custom template.
Click to show internal directories.
Click to hide internal directories.