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

op

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddContactCreated

type AddContactCreated struct {
	Payload *model.Contact
}

AddContactCreated handles this case with default header values.

Contact added.

func NewAddContactCreated

func NewAddContactCreated() *AddContactCreated

NewAddContactCreated creates a AddContactCreated with default headers values

func (*AddContactCreated) Error

func (o *AddContactCreated) Error() string

func (*AddContactCreated) GetPayload

func (o *AddContactCreated) GetPayload() *model.Contact

type AddContactDefault

type AddContactDefault struct {
	Payload *model.Error
	// contains filtered or unexported fields
}

AddContactDefault handles this case with default header values.

- 409.1000: contact already exists

func NewAddContactDefault

func NewAddContactDefault(code int) *AddContactDefault

NewAddContactDefault creates a AddContactDefault with default headers values

func (*AddContactDefault) Code

func (o *AddContactDefault) Code() int

Code gets the status code for the add contact default response

func (*AddContactDefault) Error

func (o *AddContactDefault) Error() string

func (*AddContactDefault) GetPayload

func (o *AddContactDefault) GetPayload() *model.Error

type AddContactParams

type AddContactParams struct {

	/*Args*/
	Args *model.Contact

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

AddContactParams contains all the parameters to send to the API endpoint for the add contact operation typically these are written to a http.Request

func NewAddContactParams

func NewAddContactParams() *AddContactParams

NewAddContactParams creates a new AddContactParams object with the default values initialized.

func NewAddContactParamsWithContext

func NewAddContactParamsWithContext(ctx context.Context) *AddContactParams

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

func NewAddContactParamsWithHTTPClient

func NewAddContactParamsWithHTTPClient(client *http.Client) *AddContactParams

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

func NewAddContactParamsWithTimeout

func NewAddContactParamsWithTimeout(timeout time.Duration) *AddContactParams

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

func (*AddContactParams) SetArgs added in v1.2.0

func (o *AddContactParams) SetArgs(args *model.Contact)

SetArgs adds the args to the add contact params

func (*AddContactParams) SetContext

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

SetContext adds the context to the add contact params

func (*AddContactParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the add contact params

func (*AddContactParams) SetTimeout

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

SetTimeout adds the timeout to the add contact params

func (*AddContactParams) WithArgs added in v1.2.0

func (o *AddContactParams) WithArgs(args *model.Contact) *AddContactParams

WithArgs adds the args to the add contact params

func (*AddContactParams) WithContext

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

WithContext adds the context to the add contact params

func (*AddContactParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the add contact params

func (*AddContactParams) WithTimeout

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

WithTimeout adds the timeout to the add contact params

func (*AddContactParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type AddContactReader

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

AddContactReader is a Reader for the AddContact structure.

func (*AddContactReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type Client

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

Client for op API

func (*Client) AddContact

func (a *Client) AddContact(params *AddContactParams, authInfo runtime.ClientAuthInfoWriter) (*AddContactCreated, error)

AddContact Add new contact.

func (*Client) HealthCheck added in v1.2.0

func (a *Client) HealthCheck(params *HealthCheckParams) (*HealthCheckOK, error)

HealthCheck Returns 200 if service works okay.

func (*Client) ListContacts

func (a *Client) ListContacts(params *ListContactsParams, authInfo runtime.ClientAuthInfoWriter) (*ListContactsOK, error)

ListContacts Return all contacts ordered by ID ASC using pagination.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	AddContact(params *AddContactParams, authInfo runtime.ClientAuthInfoWriter) (*AddContactCreated, error)

	HealthCheck(params *HealthCheckParams) (*HealthCheckOK, error)

	ListContacts(params *ListContactsParams, authInfo runtime.ClientAuthInfoWriter) (*ListContactsOK, 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 op API client.

type HealthCheckDefault added in v1.2.0

type HealthCheckDefault struct {
	Payload *model.Error
	// contains filtered or unexported fields
}

HealthCheckDefault handles this case with default header values.

General errors using same model as used by go-swagger for validation errors.

func NewHealthCheckDefault added in v1.2.0

func NewHealthCheckDefault(code int) *HealthCheckDefault

NewHealthCheckDefault creates a HealthCheckDefault with default headers values

func (*HealthCheckDefault) Code added in v1.2.0

func (o *HealthCheckDefault) Code() int

Code gets the status code for the health check default response

func (*HealthCheckDefault) Error added in v1.2.0

func (o *HealthCheckDefault) Error() string

func (*HealthCheckDefault) GetPayload added in v1.2.0

func (o *HealthCheckDefault) GetPayload() *model.Error

type HealthCheckOK added in v1.2.0

type HealthCheckOK struct {
	Payload interface{}
}

HealthCheckOK handles this case with default header values.

Extra details about service status, if any.

func NewHealthCheckOK added in v1.2.0

func NewHealthCheckOK() *HealthCheckOK

NewHealthCheckOK creates a HealthCheckOK with default headers values

func (*HealthCheckOK) Error added in v1.2.0

func (o *HealthCheckOK) Error() string

func (*HealthCheckOK) GetPayload added in v1.2.0

func (o *HealthCheckOK) GetPayload() interface{}

type HealthCheckParams added in v1.2.0

type HealthCheckParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

HealthCheckParams contains all the parameters to send to the API endpoint for the health check operation typically these are written to a http.Request

func NewHealthCheckParams added in v1.2.0

func NewHealthCheckParams() *HealthCheckParams

NewHealthCheckParams creates a new HealthCheckParams object with the default values initialized.

func NewHealthCheckParamsWithContext added in v1.2.0

func NewHealthCheckParamsWithContext(ctx context.Context) *HealthCheckParams

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

func NewHealthCheckParamsWithHTTPClient added in v1.2.0

func NewHealthCheckParamsWithHTTPClient(client *http.Client) *HealthCheckParams

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

func NewHealthCheckParamsWithTimeout added in v1.2.0

func NewHealthCheckParamsWithTimeout(timeout time.Duration) *HealthCheckParams

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

func (*HealthCheckParams) SetContext added in v1.2.0

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

SetContext adds the context to the health check params

func (*HealthCheckParams) SetHTTPClient added in v1.2.0

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

SetHTTPClient adds the HTTPClient to the health check params

func (*HealthCheckParams) SetTimeout added in v1.2.0

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

SetTimeout adds the timeout to the health check params

func (*HealthCheckParams) WithContext added in v1.2.0

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

WithContext adds the context to the health check params

func (*HealthCheckParams) WithHTTPClient added in v1.2.0

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

WithHTTPClient adds the HTTPClient to the health check params

func (*HealthCheckParams) WithTimeout added in v1.2.0

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

WithTimeout adds the timeout to the health check params

func (*HealthCheckParams) WriteToRequest added in v1.2.0

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

WriteToRequest writes these params to a swagger request

type HealthCheckReader added in v1.2.0

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

HealthCheckReader is a Reader for the HealthCheck structure.

func (*HealthCheckReader) ReadResponse added in v1.2.0

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

ReadResponse reads a server response into the received o.

type ListContactsBody added in v1.3.0

type ListContactsBody struct {
	model.SeekPagination
}

ListContactsBody list contacts body swagger:model ListContactsBody

func (*ListContactsBody) MarshalBinary added in v1.3.0

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

MarshalBinary interface implementation

func (ListContactsBody) MarshalJSON added in v1.3.0

func (o ListContactsBody) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object to a JSON structure

func (*ListContactsBody) UnmarshalBinary added in v1.3.0

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

UnmarshalBinary interface implementation

func (*ListContactsBody) UnmarshalJSON added in v1.3.0

func (o *ListContactsBody) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object from a JSON structure

func (*ListContactsBody) Validate added in v1.3.0

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

Validate validates this list contacts body

type ListContactsDefault

type ListContactsDefault struct {
	Payload *model.Error
	// contains filtered or unexported fields
}

ListContactsDefault handles this case with default header values.

General errors using same model as used by go-swagger for validation errors.

func NewListContactsDefault

func NewListContactsDefault(code int) *ListContactsDefault

NewListContactsDefault creates a ListContactsDefault with default headers values

func (*ListContactsDefault) Code

func (o *ListContactsDefault) Code() int

Code gets the status code for the list contacts default response

func (*ListContactsDefault) Error

func (o *ListContactsDefault) Error() string

func (*ListContactsDefault) GetPayload

func (o *ListContactsDefault) GetPayload() *model.Error

type ListContactsOK

type ListContactsOK struct {
	Payload []*model.Contact
}

ListContactsOK handles this case with default header values.

OK

func NewListContactsOK

func NewListContactsOK() *ListContactsOK

NewListContactsOK creates a ListContactsOK with default headers values

func (*ListContactsOK) Error

func (o *ListContactsOK) Error() string

func (*ListContactsOK) GetPayload

func (o *ListContactsOK) GetPayload() []*model.Contact

type ListContactsParams

type ListContactsParams struct {

	/*Args*/
	Args ListContactsBody

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

ListContactsParams contains all the parameters to send to the API endpoint for the list contacts operation typically these are written to a http.Request

func NewListContactsParams

func NewListContactsParams() *ListContactsParams

NewListContactsParams creates a new ListContactsParams object with the default values initialized.

func NewListContactsParamsWithContext

func NewListContactsParamsWithContext(ctx context.Context) *ListContactsParams

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

func NewListContactsParamsWithHTTPClient

func NewListContactsParamsWithHTTPClient(client *http.Client) *ListContactsParams

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

func NewListContactsParamsWithTimeout

func NewListContactsParamsWithTimeout(timeout time.Duration) *ListContactsParams

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

func (*ListContactsParams) SetArgs added in v1.3.0

func (o *ListContactsParams) SetArgs(args ListContactsBody)

SetArgs adds the args to the list contacts params

func (*ListContactsParams) SetContext

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

SetContext adds the context to the list contacts params

func (*ListContactsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the list contacts params

func (*ListContactsParams) SetTimeout

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

SetTimeout adds the timeout to the list contacts params

func (*ListContactsParams) WithArgs added in v1.3.0

WithArgs adds the args to the list contacts params

func (*ListContactsParams) WithContext

WithContext adds the context to the list contacts params

func (*ListContactsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the list contacts params

func (*ListContactsParams) WithTimeout

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

WithTimeout adds the timeout to the list contacts params

func (*ListContactsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ListContactsReader

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

ListContactsReader is a Reader for the ListContacts structure.

func (*ListContactsReader) ReadResponse

func (o *ListContactsReader) 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