Documentation
¶
Index ¶
- func WithAcceptApplicationJSON(r *runtime.ClientOperation)
- func WithAcceptApplicationVndCycloidIoV1JSON(r *runtime.ClientOperation)
- func WithContentTypeApplicationJSON(r *runtime.ClientOperation)
- func WithContentTypeApplicationVndCycloidIoV1JSON(r *runtime.ClientOperation)
- func WithContentTypeApplicationxWwwFormUrlencoded(r *runtime.ClientOperation)
- type Client
- type ClientOption
- type ClientService
- type GetPoliciesDefault
- func (o *GetPoliciesDefault) Code() int
- func (o *GetPoliciesDefault) Error() string
- func (o *GetPoliciesDefault) GetPayload() *models.ErrorPayload
- func (o *GetPoliciesDefault) IsClientError() bool
- func (o *GetPoliciesDefault) IsCode(code int) bool
- func (o *GetPoliciesDefault) IsRedirect() bool
- func (o *GetPoliciesDefault) IsServerError() bool
- func (o *GetPoliciesDefault) IsSuccess() bool
- func (o *GetPoliciesDefault) String() string
- type GetPoliciesOK
- func (o *GetPoliciesOK) Code() int
- func (o *GetPoliciesOK) Error() string
- func (o *GetPoliciesOK) GetPayload() *GetPoliciesOKBody
- func (o *GetPoliciesOK) IsClientError() bool
- func (o *GetPoliciesOK) IsCode(code int) bool
- func (o *GetPoliciesOK) IsRedirect() bool
- func (o *GetPoliciesOK) IsServerError() bool
- func (o *GetPoliciesOK) IsSuccess() bool
- func (o *GetPoliciesOK) String() string
- type GetPoliciesOKBody
- type GetPoliciesParams
- func (o *GetPoliciesParams) SetContext(ctx context.Context)
- func (o *GetPoliciesParams) SetDefaults()
- func (o *GetPoliciesParams) SetHTTPClient(client *http.Client)
- func (o *GetPoliciesParams) SetOrganizationCanonical(organizationCanonical string)
- func (o *GetPoliciesParams) SetPageIndex(pageIndex *uint32)
- func (o *GetPoliciesParams) SetPageSize(pageSize *uint32)
- func (o *GetPoliciesParams) SetTimeout(timeout time.Duration)
- func (o *GetPoliciesParams) WithContext(ctx context.Context) *GetPoliciesParams
- func (o *GetPoliciesParams) WithDefaults() *GetPoliciesParams
- func (o *GetPoliciesParams) WithHTTPClient(client *http.Client) *GetPoliciesParams
- func (o *GetPoliciesParams) WithOrganizationCanonical(organizationCanonical string) *GetPoliciesParams
- func (o *GetPoliciesParams) WithPageIndex(pageIndex *uint32) *GetPoliciesParams
- func (o *GetPoliciesParams) WithPageSize(pageSize *uint32) *GetPoliciesParams
- func (o *GetPoliciesParams) WithTimeout(timeout time.Duration) *GetPoliciesParams
- func (o *GetPoliciesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetPoliciesReader
- type GetPoliciesUnprocessableEntity
- func (o *GetPoliciesUnprocessableEntity) Code() int
- func (o *GetPoliciesUnprocessableEntity) Error() string
- func (o *GetPoliciesUnprocessableEntity) GetPayload() *models.ErrorPayload
- func (o *GetPoliciesUnprocessableEntity) IsClientError() bool
- func (o *GetPoliciesUnprocessableEntity) IsCode(code int) bool
- func (o *GetPoliciesUnprocessableEntity) IsRedirect() bool
- func (o *GetPoliciesUnprocessableEntity) IsServerError() bool
- func (o *GetPoliciesUnprocessableEntity) IsSuccess() bool
- func (o *GetPoliciesUnprocessableEntity) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAcceptApplicationJSON ¶
func WithAcceptApplicationJSON(r *runtime.ClientOperation)
WithAcceptApplicationJSON sets the Accept header to "application/json".
func WithAcceptApplicationVndCycloidIoV1JSON ¶
func WithAcceptApplicationVndCycloidIoV1JSON(r *runtime.ClientOperation)
WithAcceptApplicationVndCycloidIoV1JSON sets the Accept header to "application/vnd.cycloid.io.v1+json".
func WithContentTypeApplicationJSON ¶
func WithContentTypeApplicationJSON(r *runtime.ClientOperation)
WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
func WithContentTypeApplicationVndCycloidIoV1JSON ¶
func WithContentTypeApplicationVndCycloidIoV1JSON(r *runtime.ClientOperation)
WithContentTypeApplicationVndCycloidIoV1JSON sets the Content-Type header to "application/vnd.cycloid.io.v1+json".
func WithContentTypeApplicationxWwwFormUrlencoded ¶
func WithContentTypeApplicationxWwwFormUrlencoded(r *runtime.ClientOperation)
WithContentTypeApplicationxWwwFormUrlencoded sets the Content-Type header to "application/x-www-form-urlencoded".
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for policies API
func (*Client) GetPolicies ¶
func (a *Client) GetPolicies(params *GetPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPoliciesOK, error)
GetPolicies Get the list of Policies
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption may be used to customize the behavior of Client methods.
func WithAccept ¶
func WithAccept(mime string) ClientOption
WithAccept allows the client to force the Accept header to negotiate a specific Producer from the server.
You may use this option to set arbitrary extensions to your MIME media type.
func WithContentType ¶
func WithContentType(mime string) ClientOption
WithContentType allows the client to force the Content-Type header to negotiate a specific Consumer from the server.
You may use this option to set arbitrary extensions to your MIME media type.
type ClientService ¶
type ClientService interface {
GetPolicies(params *GetPoliciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPoliciesOK, error)
SetTransport(transport runtime.ClientTransport)
}
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new policies API client.
func NewClientWithBasicAuth ¶
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService
New creates a new policies API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.
func NewClientWithBearerToken ¶
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService
New creates a new policies API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.
type GetPoliciesDefault ¶
type GetPoliciesDefault struct {
/* The length of the response body in octets (8-bit bytes).
Format: uint64
*/
ContentLength uint64
Payload *models.ErrorPayload
// contains filtered or unexported fields
}
GetPoliciesDefault describes a response with status code -1, with default header values.
The response sent when an unexpected error happened, as known as an internal server error.
func NewGetPoliciesDefault ¶
func NewGetPoliciesDefault(code int) *GetPoliciesDefault
NewGetPoliciesDefault creates a GetPoliciesDefault with default headers values
func (*GetPoliciesDefault) Code ¶
func (o *GetPoliciesDefault) Code() int
Code gets the status code for the get policies default response
func (*GetPoliciesDefault) Error ¶
func (o *GetPoliciesDefault) Error() string
func (*GetPoliciesDefault) GetPayload ¶
func (o *GetPoliciesDefault) GetPayload() *models.ErrorPayload
func (*GetPoliciesDefault) IsClientError ¶
func (o *GetPoliciesDefault) IsClientError() bool
IsClientError returns true when this get policies default response has a 4xx status code
func (*GetPoliciesDefault) IsCode ¶
func (o *GetPoliciesDefault) IsCode(code int) bool
IsCode returns true when this get policies default response a status code equal to that given
func (*GetPoliciesDefault) IsRedirect ¶
func (o *GetPoliciesDefault) IsRedirect() bool
IsRedirect returns true when this get policies default response has a 3xx status code
func (*GetPoliciesDefault) IsServerError ¶
func (o *GetPoliciesDefault) IsServerError() bool
IsServerError returns true when this get policies default response has a 5xx status code
func (*GetPoliciesDefault) IsSuccess ¶
func (o *GetPoliciesDefault) IsSuccess() bool
IsSuccess returns true when this get policies default response has a 2xx status code
func (*GetPoliciesDefault) String ¶
func (o *GetPoliciesDefault) String() string
type GetPoliciesOK ¶
type GetPoliciesOK struct {
Payload *GetPoliciesOKBody
}
GetPoliciesOK describes a response with status code 200, with default header values.
List of Policies
func NewGetPoliciesOK ¶
func NewGetPoliciesOK() *GetPoliciesOK
NewGetPoliciesOK creates a GetPoliciesOK with default headers values
func (*GetPoliciesOK) Code ¶
func (o *GetPoliciesOK) Code() int
Code gets the status code for the get policies o k response
func (*GetPoliciesOK) Error ¶
func (o *GetPoliciesOK) Error() string
func (*GetPoliciesOK) GetPayload ¶
func (o *GetPoliciesOK) GetPayload() *GetPoliciesOKBody
func (*GetPoliciesOK) IsClientError ¶
func (o *GetPoliciesOK) IsClientError() bool
IsClientError returns true when this get policies o k response has a 4xx status code
func (*GetPoliciesOK) IsCode ¶
func (o *GetPoliciesOK) IsCode(code int) bool
IsCode returns true when this get policies o k response a status code equal to that given
func (*GetPoliciesOK) IsRedirect ¶
func (o *GetPoliciesOK) IsRedirect() bool
IsRedirect returns true when this get policies o k response has a 3xx status code
func (*GetPoliciesOK) IsServerError ¶
func (o *GetPoliciesOK) IsServerError() bool
IsServerError returns true when this get policies o k response has a 5xx status code
func (*GetPoliciesOK) IsSuccess ¶
func (o *GetPoliciesOK) IsSuccess() bool
IsSuccess returns true when this get policies o k response has a 2xx status code
func (*GetPoliciesOK) String ¶
func (o *GetPoliciesOK) String() string
type GetPoliciesOKBody ¶
type GetPoliciesOKBody struct {
// data
// Required: true
Data []*models.Policy `json:"data"`
// pagination
// Required: true
Pagination *models.Pagination `json:"pagination"`
}
GetPoliciesOKBody get policies o k body swagger:model GetPoliciesOKBody
func (*GetPoliciesOKBody) ContextValidate ¶
ContextValidate validate this get policies o k body based on the context it is used
func (*GetPoliciesOKBody) MarshalBinary ¶
func (o *GetPoliciesOKBody) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GetPoliciesOKBody) UnmarshalBinary ¶
func (o *GetPoliciesOKBody) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GetPoliciesParams ¶
type GetPoliciesParams struct {
/* OrganizationCanonical.
A canonical of an organization.
*/
OrganizationCanonical string
/* PageIndex.
The page number to request. The first page is 1.
Format: uint32
Default: 1
*/
PageIndex *uint32
/* PageSize.
The number of items at most which the response can have.
Format: uint32
Default: 1000
*/
PageSize *uint32
Context context.Context
HTTPClient *http.Client
// contains filtered or unexported fields
}
GetPoliciesParams contains all the parameters to send to the API endpoint
for the get policies operation. Typically these are written to a http.Request.
func NewGetPoliciesParams ¶
func NewGetPoliciesParams() *GetPoliciesParams
NewGetPoliciesParams creates a new GetPoliciesParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewGetPoliciesParamsWithContext ¶
func NewGetPoliciesParamsWithContext(ctx context.Context) *GetPoliciesParams
NewGetPoliciesParamsWithContext creates a new GetPoliciesParams object with the ability to set a context for a request.
func NewGetPoliciesParamsWithHTTPClient ¶
func NewGetPoliciesParamsWithHTTPClient(client *http.Client) *GetPoliciesParams
NewGetPoliciesParamsWithHTTPClient creates a new GetPoliciesParams object with the ability to set a custom HTTPClient for a request.
func NewGetPoliciesParamsWithTimeout ¶
func NewGetPoliciesParamsWithTimeout(timeout time.Duration) *GetPoliciesParams
NewGetPoliciesParamsWithTimeout creates a new GetPoliciesParams object with the ability to set a timeout on a request.
func (*GetPoliciesParams) SetContext ¶
func (o *GetPoliciesParams) SetContext(ctx context.Context)
SetContext adds the context to the get policies params
func (*GetPoliciesParams) SetDefaults ¶
func (o *GetPoliciesParams) SetDefaults()
SetDefaults hydrates default values in the get policies params (not the query body).
All values with no default are reset to their zero value.
func (*GetPoliciesParams) SetHTTPClient ¶
func (o *GetPoliciesParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get policies params
func (*GetPoliciesParams) SetOrganizationCanonical ¶
func (o *GetPoliciesParams) SetOrganizationCanonical(organizationCanonical string)
SetOrganizationCanonical adds the organizationCanonical to the get policies params
func (*GetPoliciesParams) SetPageIndex ¶
func (o *GetPoliciesParams) SetPageIndex(pageIndex *uint32)
SetPageIndex adds the pageIndex to the get policies params
func (*GetPoliciesParams) SetPageSize ¶
func (o *GetPoliciesParams) SetPageSize(pageSize *uint32)
SetPageSize adds the pageSize to the get policies params
func (*GetPoliciesParams) SetTimeout ¶
func (o *GetPoliciesParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get policies params
func (*GetPoliciesParams) WithContext ¶
func (o *GetPoliciesParams) WithContext(ctx context.Context) *GetPoliciesParams
WithContext adds the context to the get policies params
func (*GetPoliciesParams) WithDefaults ¶
func (o *GetPoliciesParams) WithDefaults() *GetPoliciesParams
WithDefaults hydrates default values in the get policies params (not the query body).
All values with no default are reset to their zero value.
func (*GetPoliciesParams) WithHTTPClient ¶
func (o *GetPoliciesParams) WithHTTPClient(client *http.Client) *GetPoliciesParams
WithHTTPClient adds the HTTPClient to the get policies params
func (*GetPoliciesParams) WithOrganizationCanonical ¶
func (o *GetPoliciesParams) WithOrganizationCanonical(organizationCanonical string) *GetPoliciesParams
WithOrganizationCanonical adds the organizationCanonical to the get policies params
func (*GetPoliciesParams) WithPageIndex ¶
func (o *GetPoliciesParams) WithPageIndex(pageIndex *uint32) *GetPoliciesParams
WithPageIndex adds the pageIndex to the get policies params
func (*GetPoliciesParams) WithPageSize ¶
func (o *GetPoliciesParams) WithPageSize(pageSize *uint32) *GetPoliciesParams
WithPageSize adds the pageSize to the get policies params
func (*GetPoliciesParams) WithTimeout ¶
func (o *GetPoliciesParams) WithTimeout(timeout time.Duration) *GetPoliciesParams
WithTimeout adds the timeout to the get policies params
func (*GetPoliciesParams) WriteToRequest ¶
func (o *GetPoliciesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetPoliciesReader ¶
type GetPoliciesReader struct {
// contains filtered or unexported fields
}
GetPoliciesReader is a Reader for the GetPolicies structure.
func (*GetPoliciesReader) ReadResponse ¶
func (o *GetPoliciesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetPoliciesUnprocessableEntity ¶
type GetPoliciesUnprocessableEntity struct {
/* The length of the response body in octets (8-bit bytes).
Format: uint64
*/
ContentLength uint64
Payload *models.ErrorPayload
}
GetPoliciesUnprocessableEntity describes a response with status code 422, with default header values.
All the custom errors that are generated from the Cycloid API
func NewGetPoliciesUnprocessableEntity ¶
func NewGetPoliciesUnprocessableEntity() *GetPoliciesUnprocessableEntity
NewGetPoliciesUnprocessableEntity creates a GetPoliciesUnprocessableEntity with default headers values
func (*GetPoliciesUnprocessableEntity) Code ¶
func (o *GetPoliciesUnprocessableEntity) Code() int
Code gets the status code for the get policies unprocessable entity response
func (*GetPoliciesUnprocessableEntity) Error ¶
func (o *GetPoliciesUnprocessableEntity) Error() string
func (*GetPoliciesUnprocessableEntity) GetPayload ¶
func (o *GetPoliciesUnprocessableEntity) GetPayload() *models.ErrorPayload
func (*GetPoliciesUnprocessableEntity) IsClientError ¶
func (o *GetPoliciesUnprocessableEntity) IsClientError() bool
IsClientError returns true when this get policies unprocessable entity response has a 4xx status code
func (*GetPoliciesUnprocessableEntity) IsCode ¶
func (o *GetPoliciesUnprocessableEntity) IsCode(code int) bool
IsCode returns true when this get policies unprocessable entity response a status code equal to that given
func (*GetPoliciesUnprocessableEntity) IsRedirect ¶
func (o *GetPoliciesUnprocessableEntity) IsRedirect() bool
IsRedirect returns true when this get policies unprocessable entity response has a 3xx status code
func (*GetPoliciesUnprocessableEntity) IsServerError ¶
func (o *GetPoliciesUnprocessableEntity) IsServerError() bool
IsServerError returns true when this get policies unprocessable entity response has a 5xx status code
func (*GetPoliciesUnprocessableEntity) IsSuccess ¶
func (o *GetPoliciesUnprocessableEntity) IsSuccess() bool
IsSuccess returns true when this get policies unprocessable entity response has a 2xx status code
func (*GetPoliciesUnprocessableEntity) String ¶
func (o *GetPoliciesUnprocessableEntity) String() string