stack

package
v0.0.0-...-270f78c Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Zlib Imports: 5 Imported by: 0

Documentation

Index

Constants

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

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 environment(endpoint) data.

func NewService

func NewService(connection portainer.Connection) (*Service, error)

NewService creates a new instance of a service.

func (*Service) BucketName

func (service *Service) BucketName() string

func (*Service) Create

func (service *Service) Create(stack *portainer.Stack) error

CreateStack creates a new stack.

func (*Service) DeleteStack

func (service *Service) DeleteStack(ID portainer.StackID) error

DeleteStack deletes a stack.

func (*Service) GetNextIdentifier

func (service *Service) GetNextIdentifier() int

GetNextIdentifier returns the next identifier for a stack.

func (*Service) RefreshableStacks

func (service *Service) RefreshableStacks() ([]portainer.Stack, error)

RefreshableStacks returns stacks that are configured for a periodic update

func (*Service) Stack

func (service *Service) Stack(ID portainer.StackID) (*portainer.Stack, error)

Stack returns a stack object by ID.

func (*Service) StackByName

func (service *Service) StackByName(name string) (*portainer.Stack, error)

StackByName returns a stack object by name.

func (*Service) StackByWebhookID

func (service *Service) StackByWebhookID(id string) (*portainer.Stack, error)

StackByWebhookID returns a pointer to a stack object by webhook ID. It returns nil, errors.ErrObjectNotFound if there's no stack associated with the webhook ID.

func (*Service) Stacks

func (service *Service) Stacks() ([]portainer.Stack, error)

Stacks returns an array containing all the stacks.

func (*Service) StacksByName

func (service *Service) StacksByName(name string) ([]portainer.Stack, error)

Stacks returns an array containing all the stacks with same name

func (*Service) UpdateStack

func (service *Service) UpdateStack(ID portainer.StackID, stack *portainer.Stack) error

UpdateStack updates a stack.

Jump to

Keyboard shortcuts

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