Documentation
¶
Index ¶
- func DeleteByID(client newclient.Client, spaceID string, ID string) error
- func IsNil(i interface{}) bool
- type ActionTemplate
- func Add(client newclient.Client, actionTemplate *ActionTemplate) (*ActionTemplate, error)
- func GetByID(client newclient.Client, spaceID string, actionTemplateID string) (*ActionTemplate, error)
- func GetVersionByID(client newclient.Client, spaceID string, actionTemplateID string, ...) (*ActionTemplate, error)
- func NewActionTemplate(name string, actionType string) *ActionTemplate
- func Update(client newclient.Client, actionTemplate *ActionTemplate) (*ActionTemplate, error)
- type ActionTemplateCategory
- type ActionTemplateLogoQuery
- type ActionTemplateParameter
- type ActionTemplateSearch
- type ActionTemplateService
- func (s *ActionTemplateService) Add(actionTemplate *ActionTemplate) (*ActionTemplate, error)deprecated
- func (s *ActionTemplateService) Get(actionTemplatesQuery Query) (*resources.Resources[*ActionTemplate], error)
- func (s *ActionTemplateService) GetAll() ([]*ActionTemplate, error)
- func (s *ActionTemplateService) GetByID(id string) (*ActionTemplate, error)deprecated
- func (s *ActionTemplateService) GetCategories() ([]ActionTemplateCategory, error)
- func (s *ActionTemplateService) Search(searchQuery string) ([]ActionTemplateSearch, error)
- func (s *ActionTemplateService) Update(actionTemplate *ActionTemplate) (*ActionTemplate, error)deprecated
- type ActionTemplateVersionedLogoQuery
- type Query
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByID ¶ added in v2.52.0
DeleteByID deletes the action template based on the ID provided as input.
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"`
GitDependencies []gitdependencies.GitDependency `json:"GitDependencies,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 Add ¶ added in v2.52.0
func Add(client newclient.Client, actionTemplate *ActionTemplate) (*ActionTemplate, error)
Add creates a new action template.
func GetByID ¶ added in v2.52.0
func GetByID(client newclient.Client, spaceID string, actionTemplateID 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 GetVersionByID ¶ added in v2.71.0
func GetVersionByID(client newclient.Client, spaceID string, actionTemplateID string, actionTemplateVersion int32) (*ActionTemplate, error)
GetVersionByID returns the action template that matches the input ID and a Version. If one cannot be found, it returns nil and an error.
func NewActionTemplate ¶
func NewActionTemplate(name string, actionType string) *ActionTemplate
NewActionTemplate creates and initializes an action template.
func Update ¶ added in v2.52.0
func Update(client newclient.Client, actionTemplate *ActionTemplate) (*ActionTemplate, error)
Update modifies an action template based on the one provided as input.
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 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
deprecated
func (s *ActionTemplateService) Add(actionTemplate *ActionTemplate) (*ActionTemplate, error)
Add creates a new action template.
Deprecated: use actiontemplates.Add
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
deprecated
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.
Deprecated: use actiontemplates.GetByID
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
deprecated
func (s *ActionTemplateService) Update(actionTemplate *ActionTemplate) (*ActionTemplate, error)
Update modifies an ActionTemplate based on the one provided as input.
Deprecated: use actiontemplates.Update
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.