Documentation
¶
Index ¶
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
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 *http.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) List ¶
func (a Client) List(resourceType ResourceType) (result *ListResponse, err error)
List returns all automation objects
type ClientOption ¶
type ClientOption func(*Client)
ClientOption are (optional) additional parameter passed to the creation of an automation client
type ListResponse ¶
ListResponse Response is a "general" List of Response values holding the ID and the response payload each
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 )
type Response ¶
type Response struct {
// Id is the identifier that will be used when creating a new automation object
Id string `json:"id"`
// Data is the whole body of an automation object
Data []byte `json:"-"`
}
Response is a "general" Response type holding the ID and the response payload
type ResponseErr ¶
ResponseErr is used to return HTTP related information as an error
func (ResponseErr) Error ¶
func (e ResponseErr) Error() string