v1

package
v0.1.419 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const JobKind = "Job"

JobKind is the name of the type used to represent objects of type 'job'.

View Source
const JobLinkKind = "JobLink"

JobLinkKind is the name of the type used to represent links to objects of type 'job'.

View Source
const JobListKind = "JobList"

JobListKind is the name of the type used to represent list of objects of type 'job'.

View Source
const JobListLinkKind = "JobListLink"

JobListLinkKind is the name of the type used to represent links to list of objects of type 'job'.

View Source
const JobListNilKind = "JobListNil"

JobNilKind is the name of the type used to nil lists of objects of type 'job'.

View Source
const JobNilKind = "JobNil"

JobNilKind is the name of the type used to nil references to objects of type 'job'.

View Source
const QueueKind = "Queue"

QueueKind is the name of the type used to represent objects of type 'queue'.

View Source
const QueueLinkKind = "QueueLink"

QueueLinkKind is the name of the type used to represent links to objects of type 'queue'.

View Source
const QueueListKind = "QueueList"

QueueListKind is the name of the type used to represent list of objects of type 'queue'.

View Source
const QueueListLinkKind = "QueueListLink"

QueueListLinkKind is the name of the type used to represent links to list of objects of type 'queue'.

View Source
const QueueListNilKind = "QueueListNil"

QueueNilKind is the name of the type used to nil lists of objects of type 'queue'.

View Source
const QueueNilKind = "QueueNil"

QueueNilKind is the name of the type used to nil references to objects of type 'queue'.

Variables

View Source
var OpenAPI = []byte{}/* 16059 elements not displayed */

OpenAPI contains the OpenAPI specification of the service in JSON.

Functions

func MarshalBooleanList

func MarshalBooleanList(list []bool, writer io.Writer) error

MarshalBooleanList writes a list of values of the 'boolean' type to the given writer.

func MarshalDateList

func MarshalDateList(list []time.Time, writer io.Writer) error

MarshalDateList writes a list of values of the 'date' type to the given writer.

func MarshalFloatList

func MarshalFloatList(list []float64, writer io.Writer) error

MarshalFloatList writes a list of values of the 'float' type to the given writer.

func MarshalIntegerList

func MarshalIntegerList(list []int, writer io.Writer) error

MarshalIntegerList writes a list of values of the 'integer' type to the given writer.

func MarshalInterfaceList

func MarshalInterfaceList(list []interface{}, writer io.Writer) error

MarshalInterfaceList writes a list of values of the 'interface' type to the given writer.

func MarshalJob

func MarshalJob(object *Job, writer io.Writer) error

MarshalJob writes a value of the 'job' type to the given writer.

func MarshalJobList

func MarshalJobList(list []*Job, writer io.Writer) error

MarshalJobList writes a list of values of the 'job' type to the given writer.

func MarshalLongList

func MarshalLongList(list []int64, writer io.Writer) error

MarshalLongList writes a list of values of the 'long' type to the given writer.

func MarshalMetadata

func MarshalMetadata(object *Metadata, writer io.Writer) error

MarshalMetadata writes a value of the metadata type to the given target, which can be a writer or a JSON encoder.

func MarshalQueue

func MarshalQueue(object *Queue, writer io.Writer) error

MarshalQueue writes a value of the 'queue' type to the given writer.

func MarshalQueueList

func MarshalQueueList(list []*Queue, writer io.Writer) error

MarshalQueueList writes a list of values of the 'queue' type to the given writer.

func MarshalStringList

func MarshalStringList(list []string, writer io.Writer) error

MarshalStringList writes a list of values of the 'string' type to the given writer.

func UnmarshalBooleanList

func UnmarshalBooleanList(source interface{}) (items []bool, err error)

UnmarshalBooleanList reads a list of values of the 'boolean' type from the given source, which can be a slice of bytes, a string or a reader.

func UnmarshalDateList

func UnmarshalDateList(source interface{}) (items []time.Time, err error)

UnmarshalDateList reads a list of values of the 'date' type from the given source, which can be a slice of bytes, a string or a reader.

func UnmarshalFloatList

func UnmarshalFloatList(source interface{}) (items []float64, err error)

UnmarshalFloatList reads a list of values of the 'float' type from the given source, which can be a slice of bytes, a string or a reader.

func UnmarshalIntegerList

func UnmarshalIntegerList(source interface{}) (items []int, err error)

UnmarshalIntegerList reads a list of values of the 'integer' type from the given source, which can be a slice of bytes, a string or a reader.

func UnmarshalInterfaceList

func UnmarshalInterfaceList(source interface{}) (items []interface{}, err error)

UnmarshalInterfaceList reads a list of values of the 'interface' type from the given source, which can be a slice of bytes, a string or a reader.

func UnmarshalLongList

func UnmarshalLongList(source interface{}) (items []int64, err error)

UnmarshalLongList reads a list of values of the 'long' type from the given source, which can be a slice of bytes, a string or a reader.

func UnmarshalStringList

func UnmarshalStringList(source interface{}) (items []string, err error)

UnmarshalStringList reads a list of values of the 'string' type from the given source, which can be a slice of bytes, a string or a reader.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the client of the 'root' resource.

Root of the tree of resources of the job queue service.

func NewClient

func NewClient(transport http.RoundTripper, path string) *Client

NewClient creates a new client for the 'root' resource using the given transport to send the requests and receive the responses.

func (*Client) Get

func (c *Client) Get() *MetadataRequest

Creates a new request for the method that retrieves the metadata.

func (*Client) Queues

func (c *Client) Queues() *QueuesClient

Queues returns the target 'queues' resource.

Reference to the resource that manages the collection of job queues.

type Job

type Job struct {
	// contains filtered or unexported fields
}

Job represents the values of the 'job' type.

This struct is a job in a Job Queue.

func UnmarshalJob

func UnmarshalJob(source interface{}) (object *Job, err error)

UnmarshalJob reads a value of the 'job' type from the given source, which can be an slice of bytes, a string or a reader.

func UnmarshalJobList

func UnmarshalJobList(source interface{}) (items []*Job, err error)

UnmarshalJobList reads a list of values of the 'job' type from the given source, which can be a slice of bytes, a string or a reader.

func (*Job) AbandonedAt

func (o *Job) AbandonedAt() time.Time

AbandonedAt returns the value of the 'abandoned_at' attribute, or the zero value of the type if the attribute doesn't have a value.

DLQ sent timestamp

func (*Job) Arguments

func (o *Job) Arguments() string

Arguments returns the value of the 'arguments' attribute, or the zero value of the type if the attribute doesn't have a value.

Arguments to run Job with.

func (*Job) Attempts

func (o *Job) Attempts() int

Attempts returns the value of the 'attempts' attribute, or the zero value of the type if the attribute doesn't have a value.

Number of retries.

func (*Job) CreatedAt

func (o *Job) CreatedAt() time.Time

CreatedAt returns the value of the 'created_at' attribute, or the zero value of the type if the attribute doesn't have a value.

func (*Job) Empty

func (o *Job) Empty() bool

Empty returns true if the object is empty, i.e. no attribute has a value.

func (*Job) GetAbandonedAt

func (o *Job) GetAbandonedAt() (value time.Time, ok bool)

GetAbandonedAt returns the value of the 'abandoned_at' attribute and a flag indicating if the attribute has a value.

DLQ sent timestamp

func (*Job) GetArguments

func (o *Job) GetArguments() (value string, ok bool)

GetArguments returns the value of the 'arguments' attribute and a flag indicating if the attribute has a value.

Arguments to run Job with.

func (*Job) GetAttempts

func (o *Job) GetAttempts() (value int, ok bool)

GetAttempts returns the value of the 'attempts' attribute and a flag indicating if the attribute has a value.

Number of retries.

func (*Job) GetCreatedAt

func (o *Job) GetCreatedAt() (value time.Time, ok bool)

GetCreatedAt returns the value of the 'created_at' attribute and a flag indicating if the attribute has a value.

func (*Job) GetHREF

func (o *Job) GetHREF() (value string, ok bool)

GetHREF returns the link of the object and a flag indicating if the link has a value.

func (*Job) GetID

func (o *Job) GetID() (value string, ok bool)

GetID returns the identifier of the object and a flag indicating if the identifier has a value.

func (*Job) GetReceiptId

func (o *Job) GetReceiptId() (value string, ok bool)

GetReceiptId returns the value of the 'receipt_id' attribute and a flag indicating if the attribute has a value.

Each time a specific job is pop'd, the receiptId will change, while the ID stays the same.

func (*Job) GetUpdatedAt

func (o *Job) GetUpdatedAt() (value time.Time, ok bool)

GetUpdatedAt returns the value of the 'updated_at' attribute and a flag indicating if the attribute has a value.

func (*Job) HREF

func (o *Job) HREF() string

HREF returns the link to the object.

func (*Job) ID

func (o *Job) ID() string

ID returns the identifier of the object.

func (*Job) Kind

func (o *Job) Kind() string

Kind returns the name of the type of the object.

func (o *Job) Link() bool

Link returns true iif this is a link.

func (*Job) ReceiptId

func (o *Job) ReceiptId() string

ReceiptId returns the value of the 'receipt_id' attribute, or the zero value of the type if the attribute doesn't have a value.

Each time a specific job is pop'd, the receiptId will change, while the ID stays the same.

func (*Job) UpdatedAt

func (o *Job) UpdatedAt() time.Time

UpdatedAt returns the value of the 'updated_at' attribute, or the zero value of the type if the attribute doesn't have a value.

type JobBuilder

type JobBuilder struct {
	// contains filtered or unexported fields
}

JobBuilder contains the data and logic needed to build 'job' objects.

This struct is a job in a Job Queue.

func NewJob

func NewJob() *JobBuilder

NewJob creates a new builder of 'job' objects.

func (*JobBuilder) AbandonedAt

func (b *JobBuilder) AbandonedAt(value time.Time) *JobBuilder

AbandonedAt sets the value of the 'abandoned_at' attribute to the given value.

func (*JobBuilder) Arguments

func (b *JobBuilder) Arguments(value string) *JobBuilder

Arguments sets the value of the 'arguments' attribute to the given value.

func (*JobBuilder) Attempts

func (b *JobBuilder) Attempts(value int) *JobBuilder

Attempts sets the value of the 'attempts' attribute to the given value.

func (*JobBuilder) Build

func (b *JobBuilder) Build() (object *Job, err error)

Build creates a 'job' object using the configuration stored in the builder.

func (*JobBuilder) Copy

func (b *JobBuilder) Copy(object *Job) *JobBuilder

Copy copies the attributes of the given object into this builder, discarding any previous values.

func (*JobBuilder) CreatedAt

func (b *JobBuilder) CreatedAt(value time.Time) *JobBuilder

CreatedAt sets the value of the 'created_at' attribute to the given value.

func (*JobBuilder) Empty

func (b *JobBuilder) Empty() bool

Empty returns true if the builder is empty, i.e. no attribute has a value.

func (*JobBuilder) HREF

func (b *JobBuilder) HREF(value string) *JobBuilder

HREF sets the link to the object.

func (*JobBuilder) ID

func (b *JobBuilder) ID(value string) *JobBuilder

ID sets the identifier of the object.

func (b *JobBuilder) Link(value bool) *JobBuilder

Link sets the flag that indicates if this is a link.

func (*JobBuilder) ReceiptId

func (b *JobBuilder) ReceiptId(value string) *JobBuilder

ReceiptId sets the value of the 'receipt_id' attribute to the given value.

func (*JobBuilder) UpdatedAt

func (b *JobBuilder) UpdatedAt(value time.Time) *JobBuilder

UpdatedAt sets the value of the 'updated_at' attribute to the given value.

type JobClient

type JobClient struct {
	// contains filtered or unexported fields
}

JobClient is the client of the 'job' resource.

Manages status of jobs on a job queue.

func NewJobClient

func NewJobClient(transport http.RoundTripper, path string) *JobClient

NewJobClient creates a new client for the 'job' resource using the given transport to send the requests and receive the responses.

func (*JobClient) Failure

func (c *JobClient) Failure() *JobFailureRequest

Failure creates a request for the 'failure' method.

Mark a job as Failed. This method returns '204 No Content'

func (*JobClient) Success

func (c *JobClient) Success() *JobSuccessRequest

Success creates a request for the 'success' method.

Mark a job as Successful. This method returns '204 No Content'

type JobFailureRequest

type JobFailureRequest struct {
	// contains filtered or unexported fields
}

JobFailureRequest is the request for the 'failure' method.

func (*JobFailureRequest) FailureReason

func (r *JobFailureRequest) FailureReason(value string) *JobFailureRequest

FailureReason sets the value of the 'failure_reason' parameter.

func (*JobFailureRequest) Header

func (r *JobFailureRequest) Header(name string, value interface{}) *JobFailureRequest

Header adds a request header.

func (*JobFailureRequest) Impersonate

func (r *JobFailureRequest) Impersonate(user string) *JobFailureRequest

Impersonate wraps requests on behalf of another user. Note: Services that do not support this feature may silently ignore this call.

func (*JobFailureRequest) Parameter

func (r *JobFailureRequest) Parameter(name string, value interface{}) *JobFailureRequest

Parameter adds a query parameter.

func (*JobFailureRequest) ReceiptId

func (r *JobFailureRequest) ReceiptId(value string) *JobFailureRequest

ReceiptId sets the value of the 'receipt_id' parameter.

A unique ID of a pop'ed job

func (*JobFailureRequest) Send

func (r *JobFailureRequest) Send() (result *JobFailureResponse, err error)

Send sends this request, waits for the response, and returns it.

This is a potentially lengthy operation, as it requires network communication. Consider using a context and the SendContext method.

func (*JobFailureRequest) SendContext

func (r *JobFailureRequest) SendContext(ctx context.Context) (result *JobFailureResponse, err error)

SendContext sends this request, waits for the response, and returns it.

type JobFailureResponse

type JobFailureResponse struct {
	// contains filtered or unexported fields
}

JobFailureResponse is the response for the 'failure' method.

func (*JobFailureResponse) Error

func (r *JobFailureResponse) Error() *errors.Error

Error returns the response error.

func (*JobFailureResponse) Header

func (r *JobFailureResponse) Header() http.Header

Header returns header of the response.

func (*JobFailureResponse) Status

func (r *JobFailureResponse) Status() int

Status returns the response status code.

type JobList

type JobList struct {
	// contains filtered or unexported fields
}

JobList is a list of values of the 'job' type.

func (*JobList) Each

func (l *JobList) Each(f func(item *Job) bool)

Each runs the given function for each item of the list, in order. If the function returns false the iteration stops, otherwise it continues till all the elements of the list have been processed.

func (*JobList) Empty

func (l *JobList) Empty() bool

Empty returns true if the list is empty.

func (*JobList) Get

func (l *JobList) Get(i int) *Job

Get returns the item of the list with the given index. If there is no item with that index it returns nil.

func (*JobList) GetHREF

func (l *JobList) GetHREF() (value string, ok bool)

GetHREF returns the link of the list and a flag indicating if the link has a value.

func (*JobList) HREF

func (l *JobList) HREF() string

HREF returns the link to the list.

func (*JobList) Kind

func (l *JobList) Kind() string

Kind returns the name of the type of the object.

func (*JobList) Len

func (l *JobList) Len() int

Len returns the length of the list.

func (l *JobList) Link() bool

Link returns true iif this is a link.

func (*JobList) Range

func (l *JobList) Range(f func(index int, item *Job) bool)

Range runs the given function for each index and item of the list, in order. If the function returns false the iteration stops, otherwise it continues till all the elements of the list have been processed.

func (*JobList) Slice

func (l *JobList) Slice() []*Job

Slice returns an slice containing the items of the list. The returned slice is a copy of the one used internally, so it can be modified without affecting the internal representation.

If you don't need to modify the returned slice consider using the Each or Range functions, as they don't need to allocate a new slice.

type JobListBuilder

type JobListBuilder struct {
	// contains filtered or unexported fields
}

JobListBuilder contains the data and logic needed to build 'job' objects.

func NewJobList

func NewJobList() *JobListBuilder

NewJobList creates a new builder of 'job' objects.

func (*JobListBuilder) Build

func (b *JobListBuilder) Build() (list *JobList, err error)

Build creates a list of 'job' objects using the configuration stored in the builder.

func (*JobListBuilder) Copy

func (b *JobListBuilder) Copy(list *JobList) *JobListBuilder

Copy copies the items of the given list into this builder, discarding any previous items.

func (*JobListBuilder) Empty

func (b *JobListBuilder) Empty() bool

Empty returns true if the list is empty.

func (*JobListBuilder) Items

func (b *JobListBuilder) Items(values ...*JobBuilder) *JobListBuilder

Items sets the items of the list.

type JobSuccessRequest

type JobSuccessRequest struct {
	// contains filtered or unexported fields
}

JobSuccessRequest is the request for the 'success' method.

func (*JobSuccessRequest) Header

func (r *JobSuccessRequest) Header(name string, value interface{}) *JobSuccessRequest

Header adds a request header.

func (*JobSuccessRequest) Impersonate

func (r *JobSuccessRequest) Impersonate(user string) *JobSuccessRequest

Impersonate wraps requests on behalf of another user. Note: Services that do not support this feature may silently ignore this call.

func (*JobSuccessRequest) Parameter

func (r *JobSuccessRequest) Parameter(name string, value interface{}) *JobSuccessRequest

Parameter adds a query parameter.

func (*JobSuccessRequest) ReceiptId

func (r *JobSuccessRequest) ReceiptId(value string) *JobSuccessRequest

ReceiptId sets the value of the 'receipt_id' parameter.

A unique ID of a pop'ed job

func (*JobSuccessRequest) Send

func (r *JobSuccessRequest) Send() (result *JobSuccessResponse, err error)

Send sends this request, waits for the response, and returns it.

This is a potentially lengthy operation, as it requires network communication. Consider using a context and the SendContext method.

func (*JobSuccessRequest) SendContext

func (r *JobSuccessRequest) SendContext(ctx context.Context) (result *JobSuccessResponse, err error)

SendContext sends this request, waits for the response, and returns it.

type JobSuccessResponse

type JobSuccessResponse struct {
	// contains filtered or unexported fields
}

JobSuccessResponse is the response for the 'success' method.

func (*JobSuccessResponse) Error

func (r *JobSuccessResponse) Error() *errors.Error

Error returns the response error.

func (*JobSuccessResponse) Header

func (r *JobSuccessResponse) Header() http.Header

Header returns header of the response.

func (*JobSuccessResponse) Status

func (r *JobSuccessResponse) Status() int

Status returns the response status code.

type JobsClient

type JobsClient struct {
	// contains filtered or unexported fields
}

JobsClient is the client of the 'jobs' resource.

Manages status of jobs on a job queue.

func NewJobsClient

func NewJobsClient(transport http.RoundTripper, path string) *JobsClient

NewJobsClient creates a new client for the 'jobs' resource using the given transport to send the requests and receive the responses.

func (*JobsClient) Job

func (c *JobsClient) Job(id string) *JobClient

Job returns the target 'job' resource for the given identifier.

jobs' operations (success, failure)

type Metadata

type Metadata struct {
	// contains filtered or unexported fields
}

Metadata contains the version metadata.

func UnmarshalMetadata

func UnmarshalMetadata(source interface{}) (object *Metadata, err error)

UnmarshalMetadata reads a value of the metadata type from the given source, which which can be a reader, a slice of byte or a string.

func (*Metadata) GetServerVersion

func (m *Metadata) GetServerVersion() (value string, ok bool)

GetServerVersion returns the value of the server version and a flag indicating if the attribute has a value.

func (*Metadata) ServerVersion

func (m *Metadata) ServerVersion() string

ServerVersion returns the version of the server.

type MetadataRequest

type MetadataRequest struct {
	// contains filtered or unexported fields
}

MetadataRequest is the request to retrieve the metadata.

func (*MetadataRequest) Header

func (r *MetadataRequest) Header(name string, value interface{}) *MetadataRequest

Header adds a request header.

func (*MetadataRequest) Parameter

func (r *MetadataRequest) Parameter(name string, value interface{}) *MetadataRequest

Parameter adds a query parameter.

func (*MetadataRequest) Send

func (r *MetadataRequest) Send() (result *MetadataResponse, err error)

Send sends the metadata request, waits for the response, and returns it.

This is a potentially lengthy operation, as it requires network communication. Consider using a context and the SendContext method.

func (*MetadataRequest) SendContext

func (r *MetadataRequest) SendContext(ctx context.Context) (result *MetadataResponse, err error)

SendContext sends the metadata request, waits for the response, and returns it.

type MetadataResponse

type MetadataResponse struct {
	// contains filtered or unexported fields
}

MetadataResponse is the response for the metadata request.

func (*MetadataResponse) Body

func (r *MetadataResponse) Body() *Metadata

Body returns the response body.

func (*MetadataResponse) Error

func (r *MetadataResponse) Error() *errors.Error

Error returns the response error.

func (*MetadataResponse) Header

func (r *MetadataResponse) Header() http.Header

Header returns header of the response.

func (*MetadataResponse) Status

func (r *MetadataResponse) Status() int

Status returns the response status code.

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

Queue represents the values of the 'queue' type.

func UnmarshalQueue

func UnmarshalQueue(source interface{}) (object *Queue, err error)

UnmarshalQueue reads a value of the 'queue' type from the given source, which can be an slice of bytes, a string or a reader.

func UnmarshalQueueList

func UnmarshalQueueList(source interface{}) (items []*Queue, err error)

UnmarshalQueueList reads a list of values of the 'queue' type from the given source, which can be a slice of bytes, a string or a reader.

func (*Queue) CreatedAt

func (o *Queue) CreatedAt() time.Time

CreatedAt returns the value of the 'created_at' attribute, or the zero value of the type if the attribute doesn't have a value.

func (*Queue) Empty

func (o *Queue) Empty() bool

Empty returns true if the object is empty, i.e. no attribute has a value.

func (*Queue) GetCreatedAt

func (o *Queue) GetCreatedAt() (value time.Time, ok bool)

GetCreatedAt returns the value of the 'created_at' attribute and a flag indicating if the attribute has a value.

func (*Queue) GetHREF

func (o *Queue) GetHREF() (value string, ok bool)

GetHREF returns the link of the object and a flag indicating if the link has a value.

func (*Queue) GetID

func (o *Queue) GetID() (value string, ok bool)

GetID returns the identifier of the object and a flag indicating if the identifier has a value.

func (*Queue) GetMaxAttempts

func (o *Queue) GetMaxAttempts() (value int, ok bool)

GetMaxAttempts returns the value of the 'max_attempts' attribute and a flag indicating if the attribute has a value.

SQS Visibility Timeout

func (*Queue) GetMaxRunTime

func (o *Queue) GetMaxRunTime() (value int, ok bool)

GetMaxRunTime returns the value of the 'max_run_time' attribute and a flag indicating if the attribute has a value.

func (*Queue) GetName

func (o *Queue) GetName() (value string, ok bool)

GetName returns the value of the 'name' attribute and a flag indicating if the attribute has a value.

func (*Queue) GetUpdatedAt

func (o *Queue) GetUpdatedAt() (value time.Time, ok bool)

GetUpdatedAt returns the value of the 'updated_at' attribute and a flag indicating if the attribute has a value.

func (*Queue) HREF

func (o *Queue) HREF() string

HREF returns the link to the object.

func (*Queue) ID

func (o *Queue) ID() string

ID returns the identifier of the object.

func (*Queue) Kind

func (o *Queue) Kind() string

Kind returns the name of the type of the object.

func (o *Queue) Link() bool

Link returns true iif this is a link.

func (*Queue) MaxAttempts

func (o *Queue) MaxAttempts() int

MaxAttempts returns the value of the 'max_attempts' attribute, or the zero value of the type if the attribute doesn't have a value.

SQS Visibility Timeout

func (*Queue) MaxRunTime

func (o *Queue) MaxRunTime() int

MaxRunTime returns the value of the 'max_run_time' attribute, or the zero value of the type if the attribute doesn't have a value.

func (*Queue) Name

func (o *Queue) Name() string

Name returns the value of the 'name' attribute, or the zero value of the type if the attribute doesn't have a value.

func (*Queue) UpdatedAt

func (o *Queue) UpdatedAt() time.Time

UpdatedAt returns the value of the 'updated_at' attribute, or the zero value of the type if the attribute doesn't have a value.

type QueueBuilder

type QueueBuilder struct {
	// contains filtered or unexported fields
}

QueueBuilder contains the data and logic needed to build 'queue' objects.

func NewQueue

func NewQueue() *QueueBuilder

NewQueue creates a new builder of 'queue' objects.

func (*QueueBuilder) Build

func (b *QueueBuilder) Build() (object *Queue, err error)

Build creates a 'queue' object using the configuration stored in the builder.

func (*QueueBuilder) Copy

func (b *QueueBuilder) Copy(object *Queue) *QueueBuilder

Copy copies the attributes of the given object into this builder, discarding any previous values.

func (*QueueBuilder) CreatedAt

func (b *QueueBuilder) CreatedAt(value time.Time) *QueueBuilder

CreatedAt sets the value of the 'created_at' attribute to the given value.

func (*QueueBuilder) Empty

func (b *QueueBuilder) Empty() bool

Empty returns true if the builder is empty, i.e. no attribute has a value.

func (*QueueBuilder) HREF

func (b *QueueBuilder) HREF(value string) *QueueBuilder

HREF sets the link to the object.

func (*QueueBuilder) ID

func (b *QueueBuilder) ID(value string) *QueueBuilder

ID sets the identifier of the object.

func (b *QueueBuilder) Link(value bool) *QueueBuilder

Link sets the flag that indicates if this is a link.

func (*QueueBuilder) MaxAttempts

func (b *QueueBuilder) MaxAttempts(value int) *QueueBuilder

MaxAttempts sets the value of the 'max_attempts' attribute to the given value.

func (*QueueBuilder) MaxRunTime

func (b *QueueBuilder) MaxRunTime(value int) *QueueBuilder

MaxRunTime sets the value of the 'max_run_time' attribute to the given value.

func (*QueueBuilder) Name

func (b *QueueBuilder) Name(value string) *QueueBuilder

Name sets the value of the 'name' attribute to the given value.

func (*QueueBuilder) UpdatedAt

func (b *QueueBuilder) UpdatedAt(value time.Time) *QueueBuilder

UpdatedAt sets the value of the 'updated_at' attribute to the given value.

type QueueClient

type QueueClient struct {
	// contains filtered or unexported fields
}

QueueClient is the client of the 'queue' resource.

Manages a specific job queue.

func NewQueueClient

func NewQueueClient(transport http.RoundTripper, path string) *QueueClient

NewQueueClient creates a new client for the 'queue' resource using the given transport to send the requests and receive the responses.

func (*QueueClient) Get

func (c *QueueClient) Get() *QueueGetRequest

Get creates a request for the 'get' method.

Retrieves the details of a job queue by ID.

func (*QueueClient) Jobs

func (c *QueueClient) Jobs() *JobsClient

Jobs returns the target 'jobs' resource.

jobs' operations (success, failure)

func (*QueueClient) Poll

func (c *QueueClient) Poll() *QueuePollRequest

Poll creates a request to repeatedly retrieve the object till the response has one of a given set of states and satisfies a set of predicates.

func (*QueueClient) Pop

func (c *QueueClient) Pop() *QueuePopRequest

Pop creates a request for the 'pop' method.

POP new job from a job queue

func (*QueueClient) Push

func (c *QueueClient) Push() *QueuePushRequest

Push creates a request for the 'push' method.

PUSH a new job into job queue

type QueueGetRequest

type QueueGetRequest struct {
	// contains filtered or unexported fields
}

QueueGetRequest is the request for the 'get' method.

func (*QueueGetRequest) Header

func (r *QueueGetRequest) Header(name string, value interface{}) *QueueGetRequest

Header adds a request header.

func (*QueueGetRequest) Impersonate

func (r *QueueGetRequest) Impersonate(user string) *QueueGetRequest

Impersonate wraps requests on behalf of another user. Note: Services that do not support this feature may silently ignore this call.

func (*QueueGetRequest) Parameter

func (r *QueueGetRequest) Parameter(name string, value interface{}) *QueueGetRequest

Parameter adds a query parameter.

func (*QueueGetRequest) Send

func (r *QueueGetRequest) Send() (result *QueueGetResponse, err error)

Send sends this request, waits for the response, and returns it.

This is a potentially lengthy operation, as it requires network communication. Consider using a context and the SendContext method.

func (*QueueGetRequest) SendContext

func (r *QueueGetRequest) SendContext(ctx context.Context) (result *QueueGetResponse, err error)

SendContext sends this request, waits for the response, and returns it.

type QueueGetResponse

type QueueGetResponse struct {
	// contains filtered or unexported fields
}

QueueGetResponse is the response for the 'get' method.

func (*QueueGetResponse) Body

func (r *QueueGetResponse) Body() *Queue

Body returns the value of the 'body' parameter.

func (*QueueGetResponse) Error

func (r *QueueGetResponse) Error() *errors.Error

Error returns the response error.

func (*QueueGetResponse) GetBody

func (r *QueueGetResponse) GetBody() (value *Queue, ok bool)

GetBody returns the value of the 'body' parameter and a flag indicating if the parameter has a value.

func (*QueueGetResponse) Header

func (r *QueueGetResponse) Header() http.Header

Header returns header of the response.

func (*QueueGetResponse) Status

func (r *QueueGetResponse) Status() int

Status returns the response status code.

type QueueList

type QueueList struct {
	// contains filtered or unexported fields
}

QueueList is a list of values of the 'queue' type.

func (*QueueList) Each

func (l *QueueList) Each(f func(item *Queue) bool)

Each runs the given function for each item of the list, in order. If the function returns false the iteration stops, otherwise it continues till all the elements of the list have been processed.

func (*QueueList) Empty

func (l *QueueList) Empty() bool

Empty returns true if the list is empty.

func (*QueueList) Get

func (l *QueueList) Get(i int) *Queue

Get returns the item of the list with the given index. If there is no item with that index it returns nil.

func (*QueueList) GetHREF

func (l *QueueList) GetHREF() (value string, ok bool)

GetHREF returns the link of the list and a flag indicating if the link has a value.

func (*QueueList) HREF

func (l *QueueList) HREF() string

HREF returns the link to the list.

func (*QueueList) Kind

func (l *QueueList) Kind() string

Kind returns the name of the type of the object.

func (*QueueList) Len

func (l *QueueList) Len() int

Len returns the length of the list.

func (l *QueueList) Link() bool

Link returns true iif this is a link.

func (*QueueList) Range

func (l *QueueList) Range(f func(index int, item *Queue) bool)

Range runs the given function for each index and item of the list, in order. If the function returns false the iteration stops, otherwise it continues till all the elements of the list have been processed.

func (*QueueList) Slice

func (l *QueueList) Slice() []*Queue

Slice returns an slice containing the items of the list. The returned slice is a copy of the one used internally, so it can be modified without affecting the internal representation.

If you don't need to modify the returned slice consider using the Each or Range functions, as they don't need to allocate a new slice.

type QueueListBuilder

type QueueListBuilder struct {
	// contains filtered or unexported fields
}

QueueListBuilder contains the data and logic needed to build 'queue' objects.

func NewQueueList

func NewQueueList() *QueueListBuilder

NewQueueList creates a new builder of 'queue' objects.

func (*QueueListBuilder) Build

func (b *QueueListBuilder) Build() (list *QueueList, err error)

Build creates a list of 'queue' objects using the configuration stored in the builder.

func (*QueueListBuilder) Copy

Copy copies the items of the given list into this builder, discarding any previous items.

func (*QueueListBuilder) Empty

func (b *QueueListBuilder) Empty() bool

Empty returns true if the list is empty.

func (*QueueListBuilder) Items

func (b *QueueListBuilder) Items(values ...*QueueBuilder) *QueueListBuilder

Items sets the items of the list.

type QueuePollRequest

type QueuePollRequest struct {
	// contains filtered or unexported fields
}

QueuePollRequest is the request for the Poll method.

func (*QueuePollRequest) Header

func (r *QueuePollRequest) Header(name string, value interface{}) *QueuePollRequest

Header adds a request header to all the requests that will be used to retrieve the object.

func (*QueuePollRequest) Interval

func (r *QueuePollRequest) Interval(value time.Duration) *QueuePollRequest

Interval sets the polling interval. This parameter is mandatory and must be greater than zero.

func (*QueuePollRequest) Parameter

func (r *QueuePollRequest) Parameter(name string, value interface{}) *QueuePollRequest

Parameter adds a query parameter to all the requests that will be used to retrieve the object.

func (*QueuePollRequest) Predicate

func (r *QueuePollRequest) Predicate(value func(*QueueGetResponse) bool) *QueuePollRequest

Predicate adds a predicate that the response should satisfy be considered successful. Multiple predicates can be set calling this method multiple times. The response will be considered successful if all the predicates are satisfied.

func (*QueuePollRequest) StartContext

func (r *QueuePollRequest) StartContext(ctx context.Context) (response *QueuePollResponse, err error)

StartContext starts the polling loop. Responses will be considered successful if the status is one of the values specified with the Status method and if all the predicates specified with the Predicate method return nil.

The context must have a timeout or deadline, otherwise this method will immediately return an error.

func (*QueuePollRequest) Status

func (r *QueuePollRequest) Status(value int) *QueuePollRequest

Status set the expected status of the response. Multiple values can be set calling this method multiple times. The response will be considered successful if the status is any of those values.

type QueuePollResponse

type QueuePollResponse struct {
	// contains filtered or unexported fields
}

QueuePollResponse is the response for the Poll method.

func (*QueuePollResponse) Body

func (r *QueuePollResponse) Body() *Queue

Body returns the value of the 'body' parameter.

func (*QueuePollResponse) Error

func (r *QueuePollResponse) Error() *errors.Error

Error returns the response error.

func (*QueuePollResponse) GetBody

func (r *QueuePollResponse) GetBody() (value *Queue, ok bool)

GetBody returns the value of the 'body' parameter and a flag indicating if the parameter has a value.

func (*QueuePollResponse) Header

func (r *QueuePollResponse) Header() http.Header

Header returns header of the response.

func (*QueuePollResponse) Status

func (r *QueuePollResponse) Status() int

Status returns the response status code.

type QueuePopRequest

type QueuePopRequest struct {
	// contains filtered or unexported fields
}

QueuePopRequest is the request for the 'pop' method.

func (*QueuePopRequest) Header

func (r *QueuePopRequest) Header(name string, value interface{}) *QueuePopRequest

Header adds a request header.

func (*QueuePopRequest) Impersonate

func (r *QueuePopRequest) Impersonate(user string) *QueuePopRequest

Impersonate wraps requests on behalf of another user. Note: Services that do not support this feature may silently ignore this call.

func (*QueuePopRequest) Parameter

func (r *QueuePopRequest) Parameter(name string, value interface{}) *QueuePopRequest

Parameter adds a query parameter.

func (*QueuePopRequest) Send

func (r *QueuePopRequest) Send() (result *QueuePopResponse, err error)

Send sends this request, waits for the response, and returns it.

This is a potentially lengthy operation, as it requires network communication. Consider using a context and the SendContext method.

func (*QueuePopRequest) SendContext

func (r *QueuePopRequest) SendContext(ctx context.Context) (result *QueuePopResponse, err error)

SendContext sends this request, waits for the response, and returns it.

type QueuePopResponse

type QueuePopResponse struct {
	// contains filtered or unexported fields
}

QueuePopResponse is the response for the 'pop' method.

func (*QueuePopResponse) AbandonedAt

func (r *QueuePopResponse) AbandonedAt() time.Time

AbandonedAt returns the value of the 'abandoned_at' parameter.

func (*QueuePopResponse) Arguments

func (r *QueuePopResponse) Arguments() string

Arguments returns the value of the 'arguments' parameter.

func (*QueuePopResponse) Attempts

func (r *QueuePopResponse) Attempts() int

Attempts returns the value of the 'attempts' parameter.

func (*QueuePopResponse) CreatedAt

func (r *QueuePopResponse) CreatedAt() time.Time

CreatedAt returns the value of the 'created_at' parameter.

func (*QueuePopResponse) Error

func (r *QueuePopResponse) Error() *errors.Error

Error returns the response error.

func (*QueuePopResponse) GetAbandonedAt

func (r *QueuePopResponse) GetAbandonedAt() (value time.Time, ok bool)

GetAbandonedAt returns the value of the 'abandoned_at' parameter and a flag indicating if the parameter has a value.

func (*QueuePopResponse) GetArguments

func (r *QueuePopResponse) GetArguments() (value string, ok bool)

GetArguments returns the value of the 'arguments' parameter and a flag indicating if the parameter has a value.

func (*QueuePopResponse) GetAttempts

func (r *QueuePopResponse) GetAttempts() (value int, ok bool)

GetAttempts returns the value of the 'attempts' parameter and a flag indicating if the parameter has a value.

func (*QueuePopResponse) GetCreatedAt

func (r *QueuePopResponse) GetCreatedAt() (value time.Time, ok bool)

GetCreatedAt returns the value of the 'created_at' parameter and a flag indicating if the parameter has a value.

func (*QueuePopResponse) GetHREF

func (r *QueuePopResponse) GetHREF() (value string, ok bool)

GetHREF returns the value of the 'HREF' parameter and a flag indicating if the parameter has a value.

func (*QueuePopResponse) GetID

func (r *QueuePopResponse) GetID() (value string, ok bool)

GetID returns the value of the 'ID' parameter and a flag indicating if the parameter has a value.

func (*QueuePopResponse) GetKind

func (r *QueuePopResponse) GetKind() (value string, ok bool)

GetKind returns the value of the 'kind' parameter and a flag indicating if the parameter has a value.

func (*QueuePopResponse) GetReceiptId

func (r *QueuePopResponse) GetReceiptId() (value string, ok bool)

GetReceiptId returns the value of the 'receipt_id' parameter and a flag indicating if the parameter has a value.

func (*QueuePopResponse) GetUpdatedAt

func (r *QueuePopResponse) GetUpdatedAt() (value time.Time, ok bool)

GetUpdatedAt returns the value of the 'updated_at' parameter and a flag indicating if the parameter has a value.

func (*QueuePopResponse) HREF

func (r *QueuePopResponse) HREF() string

HREF returns the value of the 'HREF' parameter.

func (*QueuePopResponse) Header

func (r *QueuePopResponse) Header() http.Header

Header returns header of the response.

func (*QueuePopResponse) ID

func (r *QueuePopResponse) ID() string

ID returns the value of the 'ID' parameter.

func (*QueuePopResponse) Kind

func (r *QueuePopResponse) Kind() string

Kind returns the value of the 'kind' parameter.

func (*QueuePopResponse) ReceiptId

func (r *QueuePopResponse) ReceiptId() string

ReceiptId returns the value of the 'receipt_id' parameter.

func (*QueuePopResponse) Status

func (r *QueuePopResponse) Status() int

Status returns the response status code.

func (*QueuePopResponse) UpdatedAt

func (r *QueuePopResponse) UpdatedAt() time.Time

UpdatedAt returns the value of the 'updated_at' parameter.

type QueuePushRequest

type QueuePushRequest struct {
	// contains filtered or unexported fields
}

QueuePushRequest is the request for the 'push' method.

func (*QueuePushRequest) AbandonedAt

func (r *QueuePushRequest) AbandonedAt(value time.Time) *QueuePushRequest

AbandonedAt sets the value of the 'abandoned_at' parameter.

func (*QueuePushRequest) Arguments

func (r *QueuePushRequest) Arguments(value string) *QueuePushRequest

Arguments sets the value of the 'arguments' parameter.

func (*QueuePushRequest) Attempts

func (r *QueuePushRequest) Attempts(value int) *QueuePushRequest

Attempts sets the value of the 'attempts' parameter.

func (*QueuePushRequest) CreatedAt

func (r *QueuePushRequest) CreatedAt(value time.Time) *QueuePushRequest

CreatedAt sets the value of the 'created_at' parameter.

func (*QueuePushRequest) Header

func (r *QueuePushRequest) Header(name string, value interface{}) *QueuePushRequest

Header adds a request header.

func (*QueuePushRequest) Impersonate

func (r *QueuePushRequest) Impersonate(user string) *QueuePushRequest

Impersonate wraps requests on behalf of another user. Note: Services that do not support this feature may silently ignore this call.

func (*QueuePushRequest) Parameter

func (r *QueuePushRequest) Parameter(name string, value interface{}) *QueuePushRequest

Parameter adds a query parameter.

func (*QueuePushRequest) Send

func (r *QueuePushRequest) Send() (result *QueuePushResponse, err error)

Send sends this request, waits for the response, and returns it.

This is a potentially lengthy operation, as it requires network communication. Consider using a context and the SendContext method.

func (*QueuePushRequest) SendContext

func (r *QueuePushRequest) SendContext(ctx context.Context) (result *QueuePushResponse, err error)

SendContext sends this request, waits for the response, and returns it.

type QueuePushResponse

type QueuePushResponse struct {
	// contains filtered or unexported fields
}

QueuePushResponse is the response for the 'push' method.

func (*QueuePushResponse) AbandonedAt

func (r *QueuePushResponse) AbandonedAt() time.Time

AbandonedAt returns the value of the 'abandoned_at' parameter.

func (*QueuePushResponse) Arguments

func (r *QueuePushResponse) Arguments() string

Arguments returns the value of the 'arguments' parameter.

func (*QueuePushResponse) Attempts

func (r *QueuePushResponse) Attempts() int

Attempts returns the value of the 'attempts' parameter.

func (*QueuePushResponse) CreatedAt

func (r *QueuePushResponse) CreatedAt() time.Time

CreatedAt returns the value of the 'created_at' parameter.

func (*QueuePushResponse) Error

func (r *QueuePushResponse) Error() *errors.Error

Error returns the response error.

func (*QueuePushResponse) GetAbandonedAt

func (r *QueuePushResponse) GetAbandonedAt() (value time.Time, ok bool)

GetAbandonedAt returns the value of the 'abandoned_at' parameter and a flag indicating if the parameter has a value.

func (*QueuePushResponse) GetArguments

func (r *QueuePushResponse) GetArguments() (value string, ok bool)

GetArguments returns the value of the 'arguments' parameter and a flag indicating if the parameter has a value.

func (*QueuePushResponse) GetAttempts

func (r *QueuePushResponse) GetAttempts() (value int, ok bool)

GetAttempts returns the value of the 'attempts' parameter and a flag indicating if the parameter has a value.

func (*QueuePushResponse) GetCreatedAt

func (r *QueuePushResponse) GetCreatedAt() (value time.Time, ok bool)

GetCreatedAt returns the value of the 'created_at' parameter and a flag indicating if the parameter has a value.

func (*QueuePushResponse) GetHREF

func (r *QueuePushResponse) GetHREF() (value string, ok bool)

GetHREF returns the value of the 'HREF' parameter and a flag indicating if the parameter has a value.

func (*QueuePushResponse) GetID

func (r *QueuePushResponse) GetID() (value string, ok bool)

GetID returns the value of the 'ID' parameter and a flag indicating if the parameter has a value.

func (*QueuePushResponse) GetKind

func (r *QueuePushResponse) GetKind() (value string, ok bool)

GetKind returns the value of the 'kind' parameter and a flag indicating if the parameter has a value.

func (*QueuePushResponse) GetReceiptId

func (r *QueuePushResponse) GetReceiptId() (value string, ok bool)

GetReceiptId returns the value of the 'receipt_id' parameter and a flag indicating if the parameter has a value.

func (*QueuePushResponse) GetUpdatedAt

func (r *QueuePushResponse) GetUpdatedAt() (value time.Time, ok bool)

GetUpdatedAt returns the value of the 'updated_at' parameter and a flag indicating if the parameter has a value.

func (*QueuePushResponse) HREF

func (r *QueuePushResponse) HREF() string

HREF returns the value of the 'HREF' parameter.

func (*QueuePushResponse) Header

func (r *QueuePushResponse) Header() http.Header

Header returns header of the response.

func (*QueuePushResponse) ID

func (r *QueuePushResponse) ID() string

ID returns the value of the 'ID' parameter.

func (*QueuePushResponse) Kind

func (r *QueuePushResponse) Kind() string

Kind returns the value of the 'kind' parameter.

func (*QueuePushResponse) ReceiptId

func (r *QueuePushResponse) ReceiptId() string

ReceiptId returns the value of the 'receipt_id' parameter.

func (*QueuePushResponse) Status

func (r *QueuePushResponse) Status() int

Status returns the response status code.

func (*QueuePushResponse) UpdatedAt

func (r *QueuePushResponse) UpdatedAt() time.Time

UpdatedAt returns the value of the 'updated_at' parameter.

type QueuesClient

type QueuesClient struct {
	// contains filtered or unexported fields
}

QueuesClient is the client of the 'queues' resource.

Manages collection of job queues.

func NewQueuesClient

func NewQueuesClient(transport http.RoundTripper, path string) *QueuesClient

NewQueuesClient creates a new client for the 'queues' resource using the given transport to send the requests and receive the responses.

func (*QueuesClient) List

func (c *QueuesClient) List() *QueuesListRequest

List creates a request for the 'list' method.

Retrieves a list of job queues.

func (*QueuesClient) Queue

func (c *QueuesClient) Queue(id string) *QueueClient

Queue returns the target 'queue' resource for the given identifier.

Returns a reference to the service that manages a specific job queue.

type QueuesListRequest

type QueuesListRequest struct {
	// contains filtered or unexported fields
}

QueuesListRequest is the request for the 'list' method.

func (*QueuesListRequest) Header

func (r *QueuesListRequest) Header(name string, value interface{}) *QueuesListRequest

Header adds a request header.

func (*QueuesListRequest) Impersonate

func (r *QueuesListRequest) Impersonate(user string) *QueuesListRequest

Impersonate wraps requests on behalf of another user. Note: Services that do not support this feature may silently ignore this call.

func (*QueuesListRequest) Page

func (r *QueuesListRequest) Page(value int) *QueuesListRequest

Page sets the value of the 'page' parameter.

Index of the requested page, where one corresponds to the first page. Page may be a token to the next page

func (*QueuesListRequest) Parameter

func (r *QueuesListRequest) Parameter(name string, value interface{}) *QueuesListRequest

Parameter adds a query parameter.

func (*QueuesListRequest) Send

func (r *QueuesListRequest) Send() (result *QueuesListResponse, err error)

Send sends this request, waits for the response, and returns it.

This is a potentially lengthy operation, as it requires network communication. Consider using a context and the SendContext method.

func (*QueuesListRequest) SendContext

func (r *QueuesListRequest) SendContext(ctx context.Context) (result *QueuesListResponse, err error)

SendContext sends this request, waits for the response, and returns it.

func (*QueuesListRequest) Size

func (r *QueuesListRequest) Size(value int) *QueuesListRequest

Size sets the value of the 'size' parameter.

Maximum number of items that will be contained in the returned page.

type QueuesListResponse

type QueuesListResponse struct {
	// contains filtered or unexported fields
}

QueuesListResponse is the response for the 'list' method.

func (*QueuesListResponse) Error

func (r *QueuesListResponse) Error() *errors.Error

Error returns the response error.

func (*QueuesListResponse) GetItems

func (r *QueuesListResponse) GetItems() (value *QueueList, ok bool)

GetItems returns the value of the 'items' parameter and a flag indicating if the parameter has a value.

Retrieved list of job queues.

func (*QueuesListResponse) GetPage

func (r *QueuesListResponse) GetPage() (value int, ok bool)

GetPage returns the value of the 'page' parameter and a flag indicating if the parameter has a value.

Index of the requested page, where one corresponds to the first page. Page may be a token to the next page

func (*QueuesListResponse) GetSize

func (r *QueuesListResponse) GetSize() (value int, ok bool)

GetSize returns the value of the 'size' parameter and a flag indicating if the parameter has a value.

Maximum number of items that will be contained in the returned page.

func (*QueuesListResponse) GetTotal

func (r *QueuesListResponse) GetTotal() (value int, ok bool)

GetTotal returns the value of the 'total' parameter and a flag indicating if the parameter has a value.

Total number of items of the collection regardless of the size of the page.

func (*QueuesListResponse) Header

func (r *QueuesListResponse) Header() http.Header

Header returns header of the response.

func (*QueuesListResponse) Items

func (r *QueuesListResponse) Items() *QueueList

Items returns the value of the 'items' parameter.

Retrieved list of job queues.

func (*QueuesListResponse) Page

func (r *QueuesListResponse) Page() int

Page returns the value of the 'page' parameter.

Index of the requested page, where one corresponds to the first page. Page may be a token to the next page

func (*QueuesListResponse) Size

func (r *QueuesListResponse) Size() int

Size returns the value of the 'size' parameter.

Maximum number of items that will be contained in the returned page.

func (*QueuesListResponse) Status

func (r *QueuesListResponse) Status() int

Status returns the response status code.

func (*QueuesListResponse) Total

func (r *QueuesListResponse) Total() int

Total returns the value of the 'total' parameter.

Total number of items of the collection regardless of the size of the page.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL