schedule

package
v0.0.0-...-4560a53 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Zlib Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const BucketName = "schedules"

BucketName represents the name of the bucket where this service stores data.

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 schedule 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) CreateSchedule

func (service *Service) CreateSchedule(schedule *portainer.Schedule) error

Create assign an ID to a new schedule and saves it.

func (*Service) DeleteSchedule

func (service *Service) DeleteSchedule(ID portainer.ScheduleID) error

DeleteSchedule deletes a schedule.

func (*Service) GetNextIdentifier

func (service *Service) GetNextIdentifier() int

GetNextIdentifier returns the next identifier for a schedule.

func (*Service) Schedule

func (service *Service) Schedule(ID portainer.ScheduleID) (*portainer.Schedule, error)

Schedule returns a schedule by ID.

func (*Service) Schedules

func (service *Service) Schedules() ([]portainer.Schedule, error)

Schedules return a array containing all the schedules.

func (*Service) SchedulesByJobType

func (service *Service) SchedulesByJobType(jobType portainer.JobType) ([]portainer.Schedule, error)

SchedulesByJobType return a array containing all the schedules with the specified JobType.

func (*Service) UpdateSchedule

func (service *Service) UpdateSchedule(ID portainer.ScheduleID, schedule *portainer.Schedule) error

UpdateSchedule updates a schedule.

Jump to

Keyboard shortcuts

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