actiontemplates

package
v2.40.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type ActionTemplate

type ActionTemplate struct {
	ActionType                string                        `json:"ActionType" validate:"required,notblank"`
	CommunityActionTemplateID string                        `json:"CommunityActionTemplateId,omitempty"`
	Description               string                        `json:"Description,omitempty"`
	Name                      string                        `json:"Name" validate:"required"`
	Packages                  []packages.PackageReference   `json:"Packages,omitempty"`
	Parameters                []ActionTemplateParameter     `json:"Parameters,omitempty"`
	Properties                map[string]core.PropertyValue `json:"Properties,omitempty"`
	SpaceID                   string                        `json:"SpaceId,omitempty"`
	Version                   int32                         `json:"Version,omitempty"`

	resources.Resource
}

ActionTemplate represents an action template in Octopus Deploy.

func NewActionTemplate

func NewActionTemplate(name string, actionType string) *ActionTemplate

NewActionTemplate creates and initializes an action template.

func (*ActionTemplate) Validate

func (a *ActionTemplate) Validate() error

Validate checks the state of this ActionTemplate and returns an error if invalid.

type ActionTemplateCategory

type ActionTemplateCategory struct {
	DisplayOrder int32             `json:"DisplayOrder,omitempty"`
	ID           string            `json:"Id,omitempty"`
	Links        map[string]string `json:"Links,omitempty"`
	Name         string            `json:"Name,omitempty"`
}

ActionTemplateCategory represents an action template category.

type ActionTemplateLogoQuery

type ActionTemplateLogoQuery struct {
	CB       string `uri:"cb,omitempty" url:"cb,omitempty"`
	TypeOrID string `uri:"typeOrId,omitempty" url:"typeOrId,omitempty"`
}

type ActionTemplateParameter

type ActionTemplateParameter struct {
	DefaultValue    *core.PropertyValue `json:"DefaultValue,omitempty"`
	DisplaySettings map[string]string   `json:"DisplaySettings,omitempty"`
	HelpText        string              `json:"HelpText,omitempty"`
	Label           string              `json:"Label,omitempty"`
	Name            string              `json:"Name,omitempty"`

	resources.Resource
}

ActionTemplateParameter represents an action template parameter.

func NewActionTemplateParameter

func NewActionTemplateParameter() *ActionTemplateParameter

type ActionTemplateSearch

type ActionTemplateSearch struct {
	Author                    string            `json:"Author,omitempty"`
	Categories                []string          `json:"Categories"`
	Category                  string            `json:"Category,omitempty"`
	CommunityActionTemplateID string            `json:"CommunityActionTemplateId,omitempty"`
	Description               string            `json:"Description,omitempty"`
	HasUpdate                 bool              `json:"HasUpdate"`
	ID                        string            `json:"Id,omitempty"`
	IsBuiltIn                 bool              `json:"IsBuiltIn"`
	IsInstalled               bool              `json:"IsInstalled"`
	Keywords                  string            `json:"Keywords,omitempty"`
	Links                     map[string]string `json:"Links,omitempty"`
	Name                      string            `json:"Name,omitempty"`
	Type                      string            `json:"Type,omitempty"`
	Website                   string            `json:"Website,omitempty"`
}

ActionTemplateSearch represents an action template search.

type ActionTemplateService

type ActionTemplateService struct {
	services.CanDeleteService
	// contains filtered or unexported fields
}

ActionTemplateService handles communication for any operations in the Octopus API that pertain to action templates.

func NewActionTemplateService

func NewActionTemplateService(sling *sling.Sling, uriTemplate string, categoriesPath string, logoPath string, searchPath string, versionedLogoPath string) *ActionTemplateService

NewActionTemplateService returns an actionTemplateService with a preconfigured client.

func (*ActionTemplateService) Add

func (s *ActionTemplateService) Add(actionTemplate *ActionTemplate) (*ActionTemplate, error)

Add creates a new action template.

func (*ActionTemplateService) Get

func (s *ActionTemplateService) Get(actionTemplatesQuery Query) (*resources.Resources[*ActionTemplate], error)

Get returns a collection of action templates based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

func (*ActionTemplateService) GetAll

func (s *ActionTemplateService) GetAll() ([]*ActionTemplate, error)

GetAll returns all action templates. If none can be found or an error occurs, it returns an empty collection.

func (*ActionTemplateService) GetByID

func (s *ActionTemplateService) GetByID(id string) (*ActionTemplate, error)

GetByID returns the action template that matches the input ID. If one cannot be found, it returns nil and an error.

func (*ActionTemplateService) GetCategories

func (s *ActionTemplateService) GetCategories() ([]ActionTemplateCategory, error)

GetCategories returns all action template categories.

func (*ActionTemplateService) Search

func (s *ActionTemplateService) Search(searchQuery string) ([]ActionTemplateSearch, error)

Search lists all available action templates including built-in, custom, and community-contributed step templates.

func (*ActionTemplateService) Update

func (s *ActionTemplateService) Update(actionTemplate *ActionTemplate) (*ActionTemplate, error)

Update modifies an ActionTemplate based on the one provided as input.

type ActionTemplateVersionedLogoQuery

type ActionTemplateVersionedLogoQuery struct {
	CB       string `uri:"cb,omitempty" url:"cb,omitempty"`
	TypeOrID string `uri:"typeOrId,omitempty" url:"typeOrId,omitempty"`
	Version  string `uri:"version,omitempty" url:"version,omitempty"`
}

type Query

type Query struct {
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	PartialName string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Skip        int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take        int      `uri:"take,omitempty" url:"take,omitempty"`
}

Query represents parameters to query the ActionTemplates service.

Jump to

Keyboard shortcuts

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