Documentation
¶
Index ¶
- func FormatStringList(list []string) string
- func PrintAppsecReport(octo *Client)
- func PrintChannels(octo *Client)
- func PrintEnvironments(octo *Client)
- func PrintFeeds(octo *Client)
- func PrintLifecycles(octo *Client)
- func PrintMachineRoles(octo *Client)
- func PrintMachines(octo *Client)
- func PrintProjectGroups(octo *Client)
- func PrintProjects(octo *Client)
- func PrintServerReport(octo *Client)
- func PrintTeamReport(octo *Client)
- func PrintTeams(octo *Client)
- func PrintTenants(octo *Client)
- func PrintUserRoles(octo *Client)
- func PrintUsers(octo *Client)
- type Channel
- type Channels
- type Client
- func (c *Client) DoGetRequest(api string) (*http.Response, error)
- func (c *Client) DoGetRequestParms(api string, queryParams map[string]string) (*http.Response, error)
- func (c *Client) GetAll() (*[]Task, error)
- func (c *Client) GetAllChannels() ([]Channel, error)
- func (c *Client) GetAllEnvironments() ([]Environment, error)
- func (c *Client) GetAllFeeds() ([]Feed, error)
- func (c *Client) GetAllLifecycles() ([]Lifecycle, error)
- func (c *Client) GetAllMachineRoles() ([]MachineRole, error)
- func (c *Client) GetAllMachines() ([]Machine, error)
- func (c *Client) GetAllProjectGroups() ([]ProjectGroup, error)
- func (c *Client) GetAllProjects() ([]Project, error)
- func (c *Client) GetAllTeams() ([]Team, error)
- func (c *Client) GetAllTenants() ([]Tenant, error)
- func (c *Client) GetAllUserRoles() ([]UserRole, error)
- func (c *Client) GetAllUsers() ([]User, error)
- func (c *Client) GetByID(ID string) (*Task, error)
- func (c *Client) GetFiltered(qp map[string]string) ([]Task, error)
- func (c *Client) GetStats() (*Tasks, error)
- func (c *Client) Version() (string, error)
- type Endpoint
- type Environment
- type Extension
- type Feed
- type Lifecycle
- type Links
- type Machine
- type MachineRole
- type PagedResults
- type Phase
- type Project
- type ProjectGroup
- type RetentionPolicy
- type Task
- type Tasks
- type Team
- type Tenant
- type TentacleVersionDetails
- type TotalCounts
- type User
- type UserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatStringList ¶
FormatStringList prints a slice of strings
func PrintAppsecReport ¶
func PrintAppsecReport(octo *Client)
PrintAppsecReport prints a CSV format report with just user roles, environments, teams.
func PrintEnvironments ¶
func PrintEnvironments(octo *Client)
PrintEnvironments displays the deployment environments
func PrintMachineRoles ¶
func PrintMachineRoles(octo *Client)
PrintMachineRoles displays the machines
func PrintProjectGroups ¶
func PrintProjectGroups(octo *Client)
PrintProjectGroups displays the deployment project groups
func PrintProjects ¶
func PrintProjects(octo *Client)
PrintProjects displays the deployment projects
func PrintServerReport ¶
func PrintServerReport(octo *Client)
PrintServerReport displays the Octopus server information
func PrintTeamReport ¶
func PrintTeamReport(octo *Client)
TeamReport displays each team, its users, roles, environments, projects, project groups, tenants
All of the parameters are pointers and can be nil, so check before dereferencing!
Types ¶
type Channel ¶
type Channel struct {
ID string `json:"Id"`
Name string `json:"Name"`
Description string `json:"Description"`
ProjectId string `json:"ProjectId"`
LifecycleId string `json:"LifecycleId"`
IsDefault bool `json:"IsDefault"`
Rules []string `json:"Rules"`
TenantTags []string `json:"TenantTags"`
SpaceId string `json:"SpaceId"`
}
Channel describes a channel
type Channels ¶
type Channels struct {
Items []Channel `json:"Items"`
PagedResults
}
Channels holds octopus channels
type Client ¶
Client is an Octopus Deploy API client
func (*Client) DoGetRequest ¶
DoGetRequest makes a Get API call to Octopus
func (*Client) DoGetRequestParms ¶
func (c *Client) DoGetRequestParms(api string, queryParams map[string]string) (*http.Response, error)
DoGetRequestParms makes a Get API call to Octopus using query parameters (can be empty)
func (*Client) GetAllChannels ¶
GetAllChannels fetches all Octopus channels and related data
note: channels does not support the /all route (it does in newer Octopus versions)
func (*Client) GetAllEnvironments ¶
func (c *Client) GetAllEnvironments() ([]Environment, error)
GetAllEnvironments fetches the Octopus environments
func (*Client) GetAllFeeds ¶
GetFeeds gets all Octopus feeds
func (*Client) GetAllLifecycles ¶
GetLifecycles gets all Octopus lifecycles
func (*Client) GetAllMachineRoles ¶
func (c *Client) GetAllMachineRoles() ([]MachineRole, error)
GetMachines gets all Octopus machines
func (*Client) GetAllMachines ¶
GetMachines gets all Octopus machines
func (*Client) GetAllProjectGroups ¶
func (c *Client) GetAllProjectGroups() ([]ProjectGroup, error)
GetProjectGroups gets all Octopus project groups
func (*Client) GetAllProjects ¶
GetAllProjects gets all Octopus projects
func (*Client) GetAllTeams ¶
GetAllTeams fetches all Octopus teams and related data
func (*Client) GetAllTenants ¶
GetTenants gets all Octopus tenants
func (*Client) GetAllUserRoles ¶
GetUserRoles fetches the Octopus roles
func (*Client) GetAllUsers ¶
GetUsers gets all Octopus users
func (*Client) GetFiltered ¶
GetFiltered gets all tasks matched by the specified query parameters
type Endpoint ¶
type Endpoint struct {
CommunicationStyle string `json:"CommunicationStyle"`
URI string `json:"Uri"`
ProxyID string `json:"ProxyID"`
Thumbprint string `json:"Thumbprint"`
TentacleVersionDetails TentacleVersionDetails `json:"TentacleVersionDetails"`
CertificateSignatureAlgorithm string `json:"CertificateSignatureAlgorithm"`
ID string `json:"Id"`
LastModifiedOn string `json:"LastModifiedOn"`
LastModifiedBy string `json:"LastModifiedBy"`
}
type Environment ¶
type Environment struct {
ID string `json:"Id"`
SpaceId string
Name string
Description string
SortOrder int
UseGuidedFailure bool
AllowDynamicInfrastructure bool
ExtensionSettings []Extension
Links Links
}
Environment describes an octopus deployment environment, such as dev, test, prod
type Feed ¶
type Feed struct {
ID string `json:"Id"`
Name string `json:"Name"`
FeedType string `json:"FeedType"`
ApiVersion string `json:"ApiVersion"`
RegistryPath string `json:"RegistryPath"`
FeedUrl string `json:"FeedUrl"`
Username string `json:"Username"`
Password string `json:"Password"`
PackageAcquisitionLocationOptions []string `json:"PackageAcquisitionLocationOptions"`
SpaceId string `json:"SpaceId"`
LastModifiedOn string `json:"LastModifiedOn"`
LastModifiedBy string `json:"LastModifiedBy"`
}
Feed describes a feed
type Lifecycle ¶
type Lifecycle struct {
ID string `json:"Id"`
Name string `json:"Name"`
Description string `json:"Description"`
SpaceId string `json:"SpaceId"`
Phases []Phase `json:"Phases"`
ReleaseRetentionPolicy RetentionPolicy `json:"ReleaseRetentionPolicy"`
TentacleRetentionPolicy RetentionPolicy `json:"TentacleRetentionPolicy"`
}
Lifecycle describes a lifecycle
type Machine ¶
type Machine struct {
ID string `json:"Id"`
Name string `json:"Name"`
Thumbprint string `json:"Thumbprint"`
URI string `json:"Uri"`
IsDisabled bool `json:"IsDisabled"`
EnvironmentIDs []string `json:"EnvironmentIds"`
Roles []string `json:"Roles"`
MachinePolicyId string `json:"MachinePolicyId"`
TenantIDs []string `json:"TenantIds"`
TenantTags []string `json:"TenantTags"`
Status string `json:"Status"`
HealthStatus string `json:"HealthStatus"`
HasLatestCalamari bool `json:"HasLatestCalamari"`
StatusSummary string `json:"StatusSummary"`
IsInProcess bool `json:"IsInProcess"`
Endpoint Endpoint `json:"Endpoint"`
}
Machine describes a machine
type PagedResults ¶
type PagedResults struct {
ItemType string `json:"ItemType"`
TotalResults int `json:"TotalResults"`
ItemsPerPage int `json:"ItemsPerPage"`
NumberOfPages int `json:"NumberOfPages"`
LastPageNumber int `json:"LastPageNumber"`
IsStale bool `json:"IsStale"`
Links Links `json:"Links"`
}
PagedResults is used in most API calls
type Phase ¶
type Phase struct {
ID string `json:"Id"`
Name string `json:"Name"`
AutomaticDeploymentTargets []string `json:"AutomaticDeploymentTargets"`
OptionalDeploymentTargets []string `json:"OptionalDeploymentTargets"`
MinimumEnvironmentsBeforePromotion int `json:"MinimumEnvironmentsBeforePromotion"`
IsOptionalPhase bool `json:"IsOptionalPhase"`
}
Phase describes a lifecycle phase
type Project ¶
type Project struct {
ID string `json:"Id"`
Name string `json:"Name"`
Slug string `json:"Slug"`
Description string `json:"Description"`
VariableSetID string `json:"VariableSetId"`
DeploymentProcessID string `json:"DeploymentProcessId"`
ProjectGroupId string `json:"ProjectGroupId"`
LifecycleId string `json:"LifecycleId"`
}
Project describes a project
type ProjectGroup ¶
type ProjectGroup struct {
ID string `json:"Id"`
Name string `json:"Name"`
Description string `json:"Description"`
EnvironmentIds []string `json:"EnvironmentIds"`
RetentionPolicyId string `json:"RetentionPolicyId"`
}
ProjectGroup describes a project group
type RetentionPolicy ¶
type Task ¶
type Task struct {
ID string `json:"Id"`
SpaceID string `json:"SpaceId"`
Name string
Description string
Arguments map[string]string
State string
Completed time.Time
QueueTime time.Time
QueueTimeExpiry time.Time
StartTime time.Time
LastUpdatedTime time.Time
CompletedTime time.Time
ServerNode string
Duration string
ErrorMessage string
HasBeenPickedUpByProcessor bool
IsCompleted bool
FinishedSuccessfully bool
HasPendingInterruptions bool
CanRerun bool
HasWarningsOrErrors bool
Links Links
}
Task describes a deployment task, either running or not
type Tasks ¶
type Tasks struct {
ItemType string
TotalResults int
ItemsPerPage int
NumberOfPages int
LastPageNumber int
TotalCounts *TotalCounts
Items []Task
Links Links
}
Tasks holds metrics on the deployment tasks
type Team ¶
type Team struct {
ID string `json:"Id"`
Name string `json:"Name"`
MemberUserIds []string `json:"MemberUserIds"`
// ExternalSecurityGroups []string `json:"ExternalSecurityGroups,omitempty"`
UserRoleIds []string `json:"UserRoleIds"`
ProjectIds []string `json:"ProjectIds"`
EnvironmentIds []string `json:"EnvironmentIds"`
TenantIds []string `json:"TenantIds"`
TenantTags []string `json:"TenantTags"`
ProjectGroupIds []string `json:"ProjectGroupIds"`
CanBeDeleted bool `json:"CanBeDeleted"`
CanBeRenamed bool `json:"CanBeRenamed"`
CanChangeRoles bool `json:"CanChangeRoles"`
CanChangeMembers bool `json:"CanChangeMembers"`
}
Team describes a team of users
type Tenant ¶
type Tenant struct {
ID string `json:"Id"`
Name string `json:"Name"`
TenantType string `json:"TenantType"`
ApiVersion string `json:"ApiVersion"`
RegistryPath string `json:"RegistryPath"`
TenantUrl string `json:"TenantUrl"`
Username string `json:"Username"`
Password string `json:"Password"`
PackageAcquisitionLocationOptions []string `json:"PackageAcquisitionLocationOptions"`
SpaceId string `json:"SpaceId"`
LastModifiedOn string `json:"LastModifiedOn"`
LastModifiedBy string `json:"LastModifiedBy"`
}
Tenant describes a feed
type TentacleVersionDetails ¶
type TotalCounts ¶
type TotalCounts struct {
Canceled int
Cancelling int
Executing int
Failed int
Queued int
Success int
TimedOut int
Interrupted int
}
TotalCounts holds metrics on currently running deployment tasks
type User ¶
type User struct {
ID string `json:"Id"`
Username string `json:"Username"`
DisplayName string `json:"DisplayName"`
IsActive bool `json:"IsActive"`
IsService bool `json:"IsService"`
EmailAddress string `json:"EmailAddress"`
CanPasswordBeEdited bool `json:"CanPasswordBeEdited"`
IsRequestor bool `json:"IsRequestor"`
}
User describes a deployment task, either running or not