Documentation ¶
Index ¶
- func WithClientRequestLimiter(limiter *concurrency.Limiter) func(client *Client)
- func WithCustomUserAgentString(userAgent string) func(client *Client)
- type Client
- func (a Client) Delete(resourceType ResourceType, id string) (err error)
- func (a Client) Get(ctx context.Context, resourceType ResourceType, id string) (result *Response, err error)
- func (a Client) List(ctx context.Context, resourceType ResourceType) (result []Response, err error)
- func (a Client) Upsert(ctx context.Context, resourceType ResourceType, id string, data []byte) (result *Response, err error)
- type ClientOption
- type Resource
- type ResourceType
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithClientRequestLimiter ¶
func WithClientRequestLimiter(limiter *concurrency.Limiter) func(client *Client)
WithClientRequestLimiter specifies that a specifies the limiter to be used for limiting parallel client requests
func WithCustomUserAgentString ¶
WithCustomUserAgentString allows to configure a custom user-agent string that the Client will send with each HTTP request If none is set, the default Monaco CLI specific user-agent is sent.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client can be used to interact with the Automation API
func NewClient ¶
func NewClient(url string, client *rest.Client, opts ...ClientOption) *Client
NewClient creates a new client to interact with the Automation API
func (Client) Delete ¶
func (a Client) Delete(resourceType ResourceType, id string) (err error)
Delete removes a given automation object by ID
func (Client) Get ¶ added in v2.5.0
func (a Client) Get(ctx context.Context, resourceType ResourceType, id string) (result *Response, err error)
Get returns a single automation object matching the given resource type and id or an error if a resource with the given ID and resourceType wasn't found
type ClientOption ¶
type ClientOption func(*Client)
ClientOption are (optional) additional parameter passed to the creation of an automation client
type Resource ¶
type Resource struct { // Path is the API path to be used for this resource Path string }
Resource specifies information about a specific resource
type ResourceType ¶
type ResourceType int
ResourceType enumerates different kind of resources
const ( Workflows ResourceType = iota BusinessCalendars SchedulingRules )