Documentation
¶
Index ¶
- func IsAPIKey(apiKey string) bool
- func IsNil(i interface{}) bool
- type AccessToken
- type ApiKey
- type Client
- func GetFakeOctopusClient(t *testing.T, apiPath string, statusCode int, responseBody string) (*Client, error)
- func NewClient(httpClient *http.Client, apiURL *url.URL, apiKey string, spaceID string) (*Client, error)
- func NewClientForTool(httpClient *http.Client, apiURL *url.URL, apiKey string, spaceID string, ...) (*Client, error)
- func NewClientWithAccessToken(httpClient *http.Client, apiURL *url.URL, accessToken string, spaceID string) (*Client, error)
- func NewClientWithCredentials(httpClient *http.Client, apiURL *url.URL, apiCredentials ICredential, ...) (*Client, error)
- type ICredential
- type RootResource
- type RootService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessToken ¶ added in v2.32.0
type AccessToken struct {
Value string
ICredential
}
func NewAccessToken ¶ added in v2.32.0
func NewAccessToken(accessToken string) (*AccessToken, error)
func (*AccessToken) GetHeaderValue ¶ added in v2.32.0
func (accessToken *AccessToken) GetHeaderValue() (string, string)
type ApiKey ¶ added in v2.32.0
type ApiKey struct {
Value string
ICredential
}
func (*ApiKey) GetHeaderValue ¶ added in v2.32.0
type Client ¶
type Client struct {
Accounts *accounts.AccountService
ActionTemplates *actiontemplates.ActionTemplateService
APIKeys *users.ApiKeyService
Artifacts *artifacts.ArtifactService
Authentication *authentication.AuthenticationService
AzureDevOpsConnectivityCheck *devops.AzureDevOpsConnectivityCheckService
AzureEnvironments *azure.AzureEnvironmentService
BuildInformation *buildinformation.BuildInformationService
CertificateConfiguration *configuration.CertificateConfigurationService
Certificates *certificates.CertificateService
Channels *channels.ChannelService
CloudTemplate *cloudtemplate.CloudTemplateService
CommunityActionTemplates *actions.CommunityActionTemplateService
Configuration *configuration.ConfigurationService
GitCredentials *credentials.Service
DashboardConfigurations *dashboard.DashboardConfigurationService
Dashboards *dashboard.DashboardService
DeploymentFreezes *deploymentfreezes.DeploymentFreezeService
DeploymentProcesses *deployments.DeploymentProcessService
Deployments *deployments.DeploymentService
DynamicExtensions *extensions.DynamicExtensionService
Environments *environments.EnvironmentService
Events *events.EventService
ExternalSecurityGroupProviders *externalsecuritygroupproviders.ExternalSecurityGroupProviderService
FeaturesConfiguration *configuration.FeaturesConfigurationService
Feeds *feeds.FeedService
Interruptions *interruptions.InterruptionService
Invitations *invitations.InvitationService
IssueTrackers *issuetrackers.IssueTrackerService
JiraIntegration *jira.JiraIntegrationService
LetsEncryptConfiguration *configuration.LetsEncryptConfigurationService
LibraryVariableSets *variables.LibraryVariableSetService
Licenses *licenses.LicenseService
Lifecycles *lifecycles.LifecycleService
MachinePolicies *machines.MachinePolicyService
MachineRoles *machines.MachineRoleService
Machines *machines.MachineService
MaintenanceConfiguration *configuration.MaintenanceConfigurationService
Migrations *migrations.MigrationService
OctopusPackageMetadata *packages.OctopusPackageMetadataService
OctopusServerNodes *octopusservernodes.OctopusServerNodeService
Packages *packages.PackageService
PackageMetadata *packages.PackageMetadataService
PerformanceConfiguration *configuration.PerformanceConfigurationService
Permissions *permissions.PermissionService
ProjectGroups *projectgroups.ProjectGroupService
Projects *projects.ProjectService
ProjectBranches *projectbranches.ProjectBranchesService
ProjectVariables *projectvariables.ProjectVariableService
ProjectTriggers *triggers.ProjectTriggerService
Proxies *proxies.ProxyService
Releases *releases.ReleaseService
Reporting *reporting.ReportingService
RunbookProcesses *runbooks.RunbookProcessService
RunbookRuns *runbooks.RunbookRunService
Runbooks *runbooks.RunbookService
RunbookSnapshots *runbooks.RunbookSnapshotService
Root *RootService
ScheduledProjectTriggers *triggers.ScheduledProjectTriggerService
Scheduler *scheduler.SchedulerService
ScopedUserRoles *userroles.ScopedUserRoleService
ScriptModules *variables.ScriptModuleService
ServerConfiguration *configuration.ServerConfigurationService
ServerStatus *serverstatus.ServerStatusService
SmtpConfiguration *configuration.SmtpConfigurationService
Spaces *spaces.SpaceService
Subscriptions *subscriptions.SubscriptionService
TagSets *tagsets.TagSetService
Tasks *tasks.TaskService
TeamMembership *teammembership.TeamMembershipService
Teams *teams.TeamService
Tenants *tenants.TenantService
TenantVariables *variables.TenantVariableService
UpgradeConfiguration *configuration.UpgradeConfigurationService
UserOnboarding *useronboarding.UserOnboardingService
UserRoles *userroles.UserRoleService
Users *users.UserService
Variables *variables.VariableService
WorkerPools *workerpools.WorkerPoolService
Workers *machines.WorkerService
WorkerToolsLatestImages *workertoolslatestimages.WorkerToolsLatestImageService
// contains filtered or unexported fields
}
Client is an OctopusDeploy for making Octopus API requests.
func GetFakeOctopusClient ¶
func GetFakeOctopusClient(t *testing.T, apiPath string, statusCode int, responseBody string) (*Client, error)
GetFakeOctopusClient -
func NewClient ¶
func NewClient(httpClient *http.Client, apiURL *url.URL, apiKey string, spaceID string) (*Client, error)
NewClient returns a new Octopus API client. If a nil client is provided, a new http.Client will be used.
func NewClientForTool ¶ added in v2.17.0
func NewClientForTool(httpClient *http.Client, apiURL *url.URL, apiKey string, spaceID string, requestingTool string) (*Client, error)
NewClientForTool returns a new Octopus API client with a tool reference in the useragent string. If a nil client is provided, a new http.Client will be used.
func NewClientWithAccessToken ¶ added in v2.31.0
func NewClientWithAccessToken(httpClient *http.Client, apiURL *url.URL, accessToken string, spaceID string) (*Client, error)
NewClientWithAccessToken returns a new Octopus API client using an access token instead of an api key. If a nil client is provided, a new http.Client will be used.
func NewClientWithCredentials ¶ added in v2.31.0
func NewClientWithCredentials(httpClient *http.Client, apiURL *url.URL, apiCredentials ICredential, spaceID string, requestingTool string) (*Client, error)
NewClientWithCredentials returns a new Octopus API client with the specified credentials and a tool reference in the useragent string. If a nil client is provided, a new http.Client will be used.
func (*Client) GetSpaceID ¶ added in v2.33.0
func (*Client) HttpSession ¶ added in v2.6.0
func (n *Client) HttpSession() *newclient.HttpSession
confirm to newclient.Client interface for compatibility
func (*Client) URITemplateCache ¶ added in v2.4.0
func (n *Client) URITemplateCache() *uritemplates.URITemplateCache
type ICredential ¶ added in v2.32.0
type RootResource ¶
type RootResource struct {
Application string `json:"Application" validate:"required"`
Version string `json:"Version" validate:"required"`
APIVersion string `json:"ApiVersion" validate:"required"`
InstallationID *uuid.UUID `json:"InstallationId" validate:"required"`
IsEarlyAccessProgram bool `json:"IsEarlyAccessProgram"`
HasLongTermSupport bool `json:"HasLongTermSupport"`
resources.Resource
}
func NewRootResource ¶
func NewRootResource() *RootResource
func (*RootResource) GetLinkPath ¶
func (r *RootResource) GetLinkPath(args ...interface{}) string
GetLinkPath returns correct Link Path
func (*RootResource) Validate ¶
func (r *RootResource) Validate() error
Validate checks the state of the root resource and returns an error if invalid.
type RootService ¶
func NewRootService ¶
func NewRootService(sling *sling.Sling, uriTemplate string) *RootService
func (*RootService) Get ¶
func (s *RootService) Get() (*RootResource, error)