Help us shape the future of Go! Take the 2026 Go Developer Survey

global

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for global API

func (*Client) GetGlobal

func (a *Client) GetGlobal(params *GetGlobalParams, authInfo runtime.ClientAuthInfoWriter) (*GetGlobalOK, error)

GetGlobal returns a global part of configuration

Returns global part of configuration.

func (*Client) ReplaceGlobal

ReplaceGlobal replaces global

Replace global part of config

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientService added in v0.2.0

type ClientService interface {
	GetGlobal(params *GetGlobalParams, authInfo runtime.ClientAuthInfoWriter) (*GetGlobalOK, error)

	ReplaceGlobal(params *ReplaceGlobalParams, authInfo runtime.ClientAuthInfoWriter) (*ReplaceGlobalOK, *ReplaceGlobalAccepted, 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 global API client.

type GetGlobalDefault

type GetGlobalDefault struct {

	/*Configuration file version
	 */
	ConfigurationVersion int64

	Payload *models.Error
	// contains filtered or unexported fields
}

GetGlobalDefault handles this case with default header values.

General Error

func NewGetGlobalDefault

func NewGetGlobalDefault(code int) *GetGlobalDefault

NewGetGlobalDefault creates a GetGlobalDefault with default headers values

func (*GetGlobalDefault) Code

func (o *GetGlobalDefault) Code() int

Code gets the status code for the get global default response

func (*GetGlobalDefault) Error

func (o *GetGlobalDefault) Error() string

func (*GetGlobalDefault) GetPayload added in v0.2.0

func (o *GetGlobalDefault) GetPayload() *models.Error

type GetGlobalOK

type GetGlobalOK struct {
	/*Configuration file version
	 */
	ConfigurationVersion int64

	Payload *GetGlobalOKBody
}

GetGlobalOK handles this case with default header values.

Successful operation

func NewGetGlobalOK

func NewGetGlobalOK() *GetGlobalOK

NewGetGlobalOK creates a GetGlobalOK with default headers values

func (*GetGlobalOK) Error

func (o *GetGlobalOK) Error() string

func (*GetGlobalOK) GetPayload added in v0.2.0

func (o *GetGlobalOK) GetPayload() *GetGlobalOKBody

type GetGlobalOKBody

type GetGlobalOKBody struct {

	// version
	Version int64 `json:"_version,omitempty"`

	// data
	Data *models.Global `json:"data,omitempty"`
}

GetGlobalOKBody get global o k body swagger:model GetGlobalOKBody

func (*GetGlobalOKBody) MarshalBinary

func (o *GetGlobalOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetGlobalOKBody) UnmarshalBinary

func (o *GetGlobalOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetGlobalOKBody) Validate

func (o *GetGlobalOKBody) Validate(formats strfmt.Registry) error

Validate validates this get global o k body

type GetGlobalParams

type GetGlobalParams struct {

	/*TransactionID
	  ID of the transaction where we want to add the operation. Cannot be used when version is specified.

	*/
	TransactionID *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetGlobalParams contains all the parameters to send to the API endpoint for the get global operation typically these are written to a http.Request

func NewGetGlobalParams

func NewGetGlobalParams() *GetGlobalParams

NewGetGlobalParams creates a new GetGlobalParams object with the default values initialized.

func NewGetGlobalParamsWithContext

func NewGetGlobalParamsWithContext(ctx context.Context) *GetGlobalParams

NewGetGlobalParamsWithContext creates a new GetGlobalParams object with the default values initialized, and the ability to set a context for a request

func NewGetGlobalParamsWithHTTPClient

func NewGetGlobalParamsWithHTTPClient(client *http.Client) *GetGlobalParams

NewGetGlobalParamsWithHTTPClient creates a new GetGlobalParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetGlobalParamsWithTimeout

func NewGetGlobalParamsWithTimeout(timeout time.Duration) *GetGlobalParams

NewGetGlobalParamsWithTimeout creates a new GetGlobalParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetGlobalParams) SetContext

func (o *GetGlobalParams) SetContext(ctx context.Context)

SetContext adds the context to the get global params

func (*GetGlobalParams) SetHTTPClient

func (o *GetGlobalParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get global params

func (*GetGlobalParams) SetTimeout

func (o *GetGlobalParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get global params

func (*GetGlobalParams) SetTransactionID

func (o *GetGlobalParams) SetTransactionID(transactionID *string)

SetTransactionID adds the transactionId to the get global params

func (*GetGlobalParams) WithContext

func (o *GetGlobalParams) WithContext(ctx context.Context) *GetGlobalParams

WithContext adds the context to the get global params

func (*GetGlobalParams) WithHTTPClient

func (o *GetGlobalParams) WithHTTPClient(client *http.Client) *GetGlobalParams

WithHTTPClient adds the HTTPClient to the get global params

func (*GetGlobalParams) WithTimeout

func (o *GetGlobalParams) WithTimeout(timeout time.Duration) *GetGlobalParams

WithTimeout adds the timeout to the get global params

func (*GetGlobalParams) WithTransactionID

func (o *GetGlobalParams) WithTransactionID(transactionID *string) *GetGlobalParams

WithTransactionID adds the transactionID to the get global params

func (*GetGlobalParams) WriteToRequest

func (o *GetGlobalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetGlobalReader

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

GetGlobalReader is a Reader for the GetGlobal structure.

func (*GetGlobalReader) ReadResponse

func (o *GetGlobalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type ReplaceGlobalAccepted

type ReplaceGlobalAccepted struct {
	/*ID of the requested reload
	 */
	ReloadID string

	Payload *models.Global
}

ReplaceGlobalAccepted handles this case with default header values.

Configuration change accepted and reload requested

func NewReplaceGlobalAccepted

func NewReplaceGlobalAccepted() *ReplaceGlobalAccepted

NewReplaceGlobalAccepted creates a ReplaceGlobalAccepted with default headers values

func (*ReplaceGlobalAccepted) Error

func (o *ReplaceGlobalAccepted) Error() string

func (*ReplaceGlobalAccepted) GetPayload added in v0.2.0

func (o *ReplaceGlobalAccepted) GetPayload() *models.Global

type ReplaceGlobalBadRequest

type ReplaceGlobalBadRequest struct {
	/*Configuration file version
	 */
	ConfigurationVersion int64

	Payload *models.Error
}

ReplaceGlobalBadRequest handles this case with default header values.

Bad request

func NewReplaceGlobalBadRequest

func NewReplaceGlobalBadRequest() *ReplaceGlobalBadRequest

NewReplaceGlobalBadRequest creates a ReplaceGlobalBadRequest with default headers values

func (*ReplaceGlobalBadRequest) Error

func (o *ReplaceGlobalBadRequest) Error() string

func (*ReplaceGlobalBadRequest) GetPayload added in v0.2.0

func (o *ReplaceGlobalBadRequest) GetPayload() *models.Error

type ReplaceGlobalDefault

type ReplaceGlobalDefault struct {

	/*Configuration file version
	 */
	ConfigurationVersion int64

	Payload *models.Error
	// contains filtered or unexported fields
}

ReplaceGlobalDefault handles this case with default header values.

General Error

func NewReplaceGlobalDefault

func NewReplaceGlobalDefault(code int) *ReplaceGlobalDefault

NewReplaceGlobalDefault creates a ReplaceGlobalDefault with default headers values

func (*ReplaceGlobalDefault) Code

func (o *ReplaceGlobalDefault) Code() int

Code gets the status code for the replace global default response

func (*ReplaceGlobalDefault) Error

func (o *ReplaceGlobalDefault) Error() string

func (*ReplaceGlobalDefault) GetPayload added in v0.2.0

func (o *ReplaceGlobalDefault) GetPayload() *models.Error

type ReplaceGlobalOK

type ReplaceGlobalOK struct {
	Payload *models.Global
}

ReplaceGlobalOK handles this case with default header values.

Global replaced

func NewReplaceGlobalOK

func NewReplaceGlobalOK() *ReplaceGlobalOK

NewReplaceGlobalOK creates a ReplaceGlobalOK with default headers values

func (*ReplaceGlobalOK) Error

func (o *ReplaceGlobalOK) Error() string

func (*ReplaceGlobalOK) GetPayload added in v0.2.0

func (o *ReplaceGlobalOK) GetPayload() *models.Global

type ReplaceGlobalParams

type ReplaceGlobalParams struct {

	/*Data*/
	Data *models.Global
	/*ForceReload
	  If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration.

	*/
	ForceReload *bool
	/*TransactionID
	  ID of the transaction where we want to add the operation. Cannot be used when version is specified.

	*/
	TransactionID *string
	/*Version
	  Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version.

	*/
	Version *int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ReplaceGlobalParams contains all the parameters to send to the API endpoint for the replace global operation typically these are written to a http.Request

func NewReplaceGlobalParams

func NewReplaceGlobalParams() *ReplaceGlobalParams

NewReplaceGlobalParams creates a new ReplaceGlobalParams object with the default values initialized.

func NewReplaceGlobalParamsWithContext

func NewReplaceGlobalParamsWithContext(ctx context.Context) *ReplaceGlobalParams

NewReplaceGlobalParamsWithContext creates a new ReplaceGlobalParams object with the default values initialized, and the ability to set a context for a request

func NewReplaceGlobalParamsWithHTTPClient

func NewReplaceGlobalParamsWithHTTPClient(client *http.Client) *ReplaceGlobalParams

NewReplaceGlobalParamsWithHTTPClient creates a new ReplaceGlobalParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewReplaceGlobalParamsWithTimeout

func NewReplaceGlobalParamsWithTimeout(timeout time.Duration) *ReplaceGlobalParams

NewReplaceGlobalParamsWithTimeout creates a new ReplaceGlobalParams object with the default values initialized, and the ability to set a timeout on a request

func (*ReplaceGlobalParams) SetContext

func (o *ReplaceGlobalParams) SetContext(ctx context.Context)

SetContext adds the context to the replace global params

func (*ReplaceGlobalParams) SetData

func (o *ReplaceGlobalParams) SetData(data *models.Global)

SetData adds the data to the replace global params

func (*ReplaceGlobalParams) SetForceReload

func (o *ReplaceGlobalParams) SetForceReload(forceReload *bool)

SetForceReload adds the forceReload to the replace global params

func (*ReplaceGlobalParams) SetHTTPClient

func (o *ReplaceGlobalParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the replace global params

func (*ReplaceGlobalParams) SetTimeout

func (o *ReplaceGlobalParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the replace global params

func (*ReplaceGlobalParams) SetTransactionID

func (o *ReplaceGlobalParams) SetTransactionID(transactionID *string)

SetTransactionID adds the transactionId to the replace global params

func (*ReplaceGlobalParams) SetVersion

func (o *ReplaceGlobalParams) SetVersion(version *int64)

SetVersion adds the version to the replace global params

func (*ReplaceGlobalParams) WithContext

WithContext adds the context to the replace global params

func (*ReplaceGlobalParams) WithData

WithData adds the data to the replace global params

func (*ReplaceGlobalParams) WithForceReload

func (o *ReplaceGlobalParams) WithForceReload(forceReload *bool) *ReplaceGlobalParams

WithForceReload adds the forceReload to the replace global params

func (*ReplaceGlobalParams) WithHTTPClient

func (o *ReplaceGlobalParams) WithHTTPClient(client *http.Client) *ReplaceGlobalParams

WithHTTPClient adds the HTTPClient to the replace global params

func (*ReplaceGlobalParams) WithTimeout

func (o *ReplaceGlobalParams) WithTimeout(timeout time.Duration) *ReplaceGlobalParams

WithTimeout adds the timeout to the replace global params

func (*ReplaceGlobalParams) WithTransactionID

func (o *ReplaceGlobalParams) WithTransactionID(transactionID *string) *ReplaceGlobalParams

WithTransactionID adds the transactionID to the replace global params

func (*ReplaceGlobalParams) WithVersion

func (o *ReplaceGlobalParams) WithVersion(version *int64) *ReplaceGlobalParams

WithVersion adds the version to the replace global params

func (*ReplaceGlobalParams) WriteToRequest

func (o *ReplaceGlobalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type ReplaceGlobalReader

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

ReplaceGlobalReader is a Reader for the ReplaceGlobal structure.

func (*ReplaceGlobalReader) ReadResponse

func (o *ReplaceGlobalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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