Documentation
¶
Index ¶
- type BatchingOctopusApiClient
- type OctopusApiClient
- func (o *OctopusApiClient) EnsureSpaceDeleted(spaceId string) (funcErr error)
- func (o *OctopusApiClient) GetAllResources(resourceType string, resources any, queryParams ...[]string) (funcErr error)
- func (o *OctopusApiClient) GetResource(resourceType string, resources any) (exists bool, funcErr error)
- func (o *OctopusApiClient) GetResourceById(resourceType string, id string, resources any) (exists bool, funcErr error)
- func (o *OctopusApiClient) GetSpace(resources *octopus2.Space) (funcErr error)
- func (o *OctopusApiClient) GetSpaceBaseUrl() (string, error)
- func (o *OctopusApiClient) GetSpaces() (spaces []octopus2.Space, funcErr error)
- type OctopusClient
- type ResultError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchingOctopusApiClient ¶ added in v0.1.1092
type BatchingOctopusApiClient[T any] struct { Client OctopusClient }
BatchingOctopusApiClient is a wrapper over the regular client that exposes the ability to return a group of resources while making smaller batched requests to the Octopus API. This has the benefit of allowing large collections to be processed in a lazy fashion.
func (*BatchingOctopusApiClient[T]) GetAllResourcesBatch ¶ added in v0.1.1092
func (c *BatchingOctopusApiClient[T]) GetAllResourcesBatch(done <-chan struct{}, resourceType string) <-chan ResultError[T]
GetAllResourcesBatch retrieves all the resources of a given type but in small batches. This allows the resources to be exported in smaller chunks, which is useful for large spaces.
type OctopusApiClient ¶ added in v0.1.807
type OctopusApiClient struct {
Url string
ApiKey string
Space string
// contains filtered or unexported fields
}
func (*OctopusApiClient) EnsureSpaceDeleted ¶ added in v0.1.807
func (o *OctopusApiClient) EnsureSpaceDeleted(spaceId string) (funcErr error)
func (*OctopusApiClient) GetAllResources ¶ added in v0.1.807
func (o *OctopusApiClient) GetAllResources(resourceType string, resources any, queryParams ...[]string) (funcErr error)
func (*OctopusApiClient) GetResource ¶ added in v0.1.807
func (o *OctopusApiClient) GetResource(resourceType string, resources any) (exists bool, funcErr error)
func (*OctopusApiClient) GetResourceById ¶ added in v0.1.807
func (*OctopusApiClient) GetSpace ¶ added in v0.1.807
func (o *OctopusApiClient) GetSpace(resources *octopus2.Space) (funcErr error)
func (*OctopusApiClient) GetSpaceBaseUrl ¶ added in v0.1.807
func (o *OctopusApiClient) GetSpaceBaseUrl() (string, error)
type OctopusClient ¶
type OctopusClient interface {
GetSpaceBaseUrl() (string, error)
GetSpace(resources *octopus2.Space) error
GetSpaces() ([]octopus2.Space, error)
EnsureSpaceDeleted(spaceId string) (funcErr error)
GetResource(resourceType string, resources any) (exists bool, funcErr error)
GetResourceById(resourceType string, id string, resources any) (exists bool, funcErr error)
GetAllResources(resourceType string, resources any, queryParams ...[]string) (funcErr error)
}
type ResultError ¶ added in v0.1.1092
ResultError captures either a successful result or an error.
Click to show internal directories.
Click to hide internal directories.