fail2ban

package
v0.0.0-...-07c1023 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 10 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 fail2ban API

func (*Client) DeleteFail2banIP

func (a *Client) DeleteFail2banIP(params *DeleteFail2banIPParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteFail2banIPOK, error)

DeleteFail2banIP delete fail2ban Ip API

func (*Client) GetFail2banIps

func (a *Client) GetFail2banIps(params *GetFail2banIpsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFail2banIpsOK, error)

GetFail2banIps get fail2ban ips API

func (*Client) PostFail2banIP

func (a *Client) PostFail2banIP(params *PostFail2banIPParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostFail2banIPOK, error)

PostFail2banIP post fail2ban Ip API

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 is the option for Client methods

type ClientService

type ClientService interface {
	DeleteFail2banIP(params *DeleteFail2banIPParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteFail2banIPOK, error)

	GetFail2banIps(params *GetFail2banIpsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFail2banIpsOK, error)

	PostFail2banIP(params *PostFail2banIPParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostFail2banIPOK, 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 fail2ban API client.

type DeleteFail2banIPInternalServerError

type DeleteFail2banIPInternalServerError struct {
}
DeleteFail2banIPInternalServerError describes a response with status code 500, with default header values.

Internal error

func NewDeleteFail2banIPInternalServerError

func NewDeleteFail2banIPInternalServerError() *DeleteFail2banIPInternalServerError

NewDeleteFail2banIPInternalServerError creates a DeleteFail2banIPInternalServerError with default headers values

func (*DeleteFail2banIPInternalServerError) Error

type DeleteFail2banIPMethodNotAllowed

type DeleteFail2banIPMethodNotAllowed struct {
}
DeleteFail2banIPMethodNotAllowed describes a response with status code 405, with default header values.

Invalid input

func NewDeleteFail2banIPMethodNotAllowed

func NewDeleteFail2banIPMethodNotAllowed() *DeleteFail2banIPMethodNotAllowed

NewDeleteFail2banIPMethodNotAllowed creates a DeleteFail2banIPMethodNotAllowed with default headers values

func (*DeleteFail2banIPMethodNotAllowed) Error

type DeleteFail2banIPNotFound

type DeleteFail2banIPNotFound struct {
}
DeleteFail2banIPNotFound describes a response with status code 404, with default header values.

IP was not found

func NewDeleteFail2banIPNotFound

func NewDeleteFail2banIPNotFound() *DeleteFail2banIPNotFound

NewDeleteFail2banIPNotFound creates a DeleteFail2banIPNotFound with default headers values

func (*DeleteFail2banIPNotFound) Error

func (o *DeleteFail2banIPNotFound) Error() string

type DeleteFail2banIPOK

type DeleteFail2banIPOK struct {
}
DeleteFail2banIPOK describes a response with status code 200, with default header values.

Successful operation

func NewDeleteFail2banIPOK

func NewDeleteFail2banIPOK() *DeleteFail2banIPOK

NewDeleteFail2banIPOK creates a DeleteFail2banIPOK with default headers values

func (*DeleteFail2banIPOK) Error

func (o *DeleteFail2banIPOK) Error() string

type DeleteFail2banIPParams

type DeleteFail2banIPParams struct {

	/* IP.

	   IP address to delete
	*/
	IP string

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

DeleteFail2banIPParams contains all the parameters to send to the API endpoint

for the delete fail2ban Ip operation.

Typically these are written to a http.Request.

func NewDeleteFail2banIPParams

func NewDeleteFail2banIPParams() *DeleteFail2banIPParams

NewDeleteFail2banIPParams creates a new DeleteFail2banIPParams 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 NewDeleteFail2banIPParamsWithContext

func NewDeleteFail2banIPParamsWithContext(ctx context.Context) *DeleteFail2banIPParams

NewDeleteFail2banIPParamsWithContext creates a new DeleteFail2banIPParams object with the ability to set a context for a request.

func NewDeleteFail2banIPParamsWithHTTPClient

func NewDeleteFail2banIPParamsWithHTTPClient(client *http.Client) *DeleteFail2banIPParams

NewDeleteFail2banIPParamsWithHTTPClient creates a new DeleteFail2banIPParams object with the ability to set a custom HTTPClient for a request.

func NewDeleteFail2banIPParamsWithTimeout

func NewDeleteFail2banIPParamsWithTimeout(timeout time.Duration) *DeleteFail2banIPParams

NewDeleteFail2banIPParamsWithTimeout creates a new DeleteFail2banIPParams object with the ability to set a timeout on a request.

func (*DeleteFail2banIPParams) SetContext

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

SetContext adds the context to the delete fail2ban Ip params

func (*DeleteFail2banIPParams) SetDefaults

func (o *DeleteFail2banIPParams) SetDefaults()

SetDefaults hydrates default values in the delete fail2ban Ip params (not the query body).

All values with no default are reset to their zero value.

func (*DeleteFail2banIPParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the delete fail2ban Ip params

func (*DeleteFail2banIPParams) SetIP

func (o *DeleteFail2banIPParams) SetIP(ip string)

SetIP adds the ip to the delete fail2ban Ip params

func (*DeleteFail2banIPParams) SetTimeout

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

SetTimeout adds the timeout to the delete fail2ban Ip params

func (*DeleteFail2banIPParams) WithContext

WithContext adds the context to the delete fail2ban Ip params

func (*DeleteFail2banIPParams) WithDefaults

WithDefaults hydrates default values in the delete fail2ban Ip params (not the query body).

All values with no default are reset to their zero value.

func (*DeleteFail2banIPParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the delete fail2ban Ip params

func (*DeleteFail2banIPParams) WithIP

WithIP adds the ip to the delete fail2ban Ip params

func (*DeleteFail2banIPParams) WithTimeout

WithTimeout adds the timeout to the delete fail2ban Ip params

func (*DeleteFail2banIPParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type DeleteFail2banIPReader

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

DeleteFail2banIPReader is a Reader for the DeleteFail2banIP structure.

func (*DeleteFail2banIPReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetFail2banIpsInternalServerError

type GetFail2banIpsInternalServerError struct {
}
GetFail2banIpsInternalServerError describes a response with status code 500, with default header values.

Internal error

func NewGetFail2banIpsInternalServerError

func NewGetFail2banIpsInternalServerError() *GetFail2banIpsInternalServerError

NewGetFail2banIpsInternalServerError creates a GetFail2banIpsInternalServerError with default headers values

func (*GetFail2banIpsInternalServerError) Error

type GetFail2banIpsOK

type GetFail2banIpsOK struct {
	Payload *models.Fail2banListItem
}
GetFail2banIpsOK describes a response with status code 200, with default header values.

Successful listing of banned IPs by Fail2ban.

func NewGetFail2banIpsOK

func NewGetFail2banIpsOK() *GetFail2banIpsOK

NewGetFail2banIpsOK creates a GetFail2banIpsOK with default headers values

func (*GetFail2banIpsOK) Error

func (o *GetFail2banIpsOK) Error() string

func (*GetFail2banIpsOK) GetPayload

func (o *GetFail2banIpsOK) GetPayload() *models.Fail2banListItem

type GetFail2banIpsParams

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

GetFail2banIpsParams contains all the parameters to send to the API endpoint

for the get fail2ban ips operation.

Typically these are written to a http.Request.

func NewGetFail2banIpsParams

func NewGetFail2banIpsParams() *GetFail2banIpsParams

NewGetFail2banIpsParams creates a new GetFail2banIpsParams 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 NewGetFail2banIpsParamsWithContext

func NewGetFail2banIpsParamsWithContext(ctx context.Context) *GetFail2banIpsParams

NewGetFail2banIpsParamsWithContext creates a new GetFail2banIpsParams object with the ability to set a context for a request.

func NewGetFail2banIpsParamsWithHTTPClient

func NewGetFail2banIpsParamsWithHTTPClient(client *http.Client) *GetFail2banIpsParams

NewGetFail2banIpsParamsWithHTTPClient creates a new GetFail2banIpsParams object with the ability to set a custom HTTPClient for a request.

func NewGetFail2banIpsParamsWithTimeout

func NewGetFail2banIpsParamsWithTimeout(timeout time.Duration) *GetFail2banIpsParams

NewGetFail2banIpsParamsWithTimeout creates a new GetFail2banIpsParams object with the ability to set a timeout on a request.

func (*GetFail2banIpsParams) SetContext

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

SetContext adds the context to the get fail2ban ips params

func (*GetFail2banIpsParams) SetDefaults

func (o *GetFail2banIpsParams) SetDefaults()

SetDefaults hydrates default values in the get fail2ban ips params (not the query body).

All values with no default are reset to their zero value.

func (*GetFail2banIpsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get fail2ban ips params

func (*GetFail2banIpsParams) SetTimeout

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

SetTimeout adds the timeout to the get fail2ban ips params

func (*GetFail2banIpsParams) WithContext

WithContext adds the context to the get fail2ban ips params

func (*GetFail2banIpsParams) WithDefaults

func (o *GetFail2banIpsParams) WithDefaults() *GetFail2banIpsParams

WithDefaults hydrates default values in the get fail2ban ips params (not the query body).

All values with no default are reset to their zero value.

func (*GetFail2banIpsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get fail2ban ips params

func (*GetFail2banIpsParams) WithTimeout

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

WithTimeout adds the timeout to the get fail2ban ips params

func (*GetFail2banIpsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetFail2banIpsReader

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

GetFail2banIpsReader is a Reader for the GetFail2banIps structure.

func (*GetFail2banIpsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PostFail2banIPInternalServerError

type PostFail2banIPInternalServerError struct {
}
PostFail2banIPInternalServerError describes a response with status code 500, with default header values.

Internal error

func NewPostFail2banIPInternalServerError

func NewPostFail2banIPInternalServerError() *PostFail2banIPInternalServerError

NewPostFail2banIPInternalServerError creates a PostFail2banIPInternalServerError with default headers values

func (*PostFail2banIPInternalServerError) Error

type PostFail2banIPMethodNotAllowed

type PostFail2banIPMethodNotAllowed struct {
}
PostFail2banIPMethodNotAllowed describes a response with status code 405, with default header values.

Invalid input

func NewPostFail2banIPMethodNotAllowed

func NewPostFail2banIPMethodNotAllowed() *PostFail2banIPMethodNotAllowed

NewPostFail2banIPMethodNotAllowed creates a PostFail2banIPMethodNotAllowed with default headers values

func (*PostFail2banIPMethodNotAllowed) Error

type PostFail2banIPOK

type PostFail2banIPOK struct {
}
PostFail2banIPOK describes a response with status code 200, with default header values.

Successful operation

func NewPostFail2banIPOK

func NewPostFail2banIPOK() *PostFail2banIPOK

NewPostFail2banIPOK creates a PostFail2banIPOK with default headers values

func (*PostFail2banIPOK) Error

func (o *PostFail2banIPOK) Error() string

type PostFail2banIPParams

type PostFail2banIPParams struct {

	/* Ipaddress.

	   IP address to add to fail2ban
	*/
	Ipaddress string

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

PostFail2banIPParams contains all the parameters to send to the API endpoint

for the post fail2ban Ip operation.

Typically these are written to a http.Request.

func NewPostFail2banIPParams

func NewPostFail2banIPParams() *PostFail2banIPParams

NewPostFail2banIPParams creates a new PostFail2banIPParams 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 NewPostFail2banIPParamsWithContext

func NewPostFail2banIPParamsWithContext(ctx context.Context) *PostFail2banIPParams

NewPostFail2banIPParamsWithContext creates a new PostFail2banIPParams object with the ability to set a context for a request.

func NewPostFail2banIPParamsWithHTTPClient

func NewPostFail2banIPParamsWithHTTPClient(client *http.Client) *PostFail2banIPParams

NewPostFail2banIPParamsWithHTTPClient creates a new PostFail2banIPParams object with the ability to set a custom HTTPClient for a request.

func NewPostFail2banIPParamsWithTimeout

func NewPostFail2banIPParamsWithTimeout(timeout time.Duration) *PostFail2banIPParams

NewPostFail2banIPParamsWithTimeout creates a new PostFail2banIPParams object with the ability to set a timeout on a request.

func (*PostFail2banIPParams) SetContext

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

SetContext adds the context to the post fail2ban Ip params

func (*PostFail2banIPParams) SetDefaults

func (o *PostFail2banIPParams) SetDefaults()

SetDefaults hydrates default values in the post fail2ban Ip params (not the query body).

All values with no default are reset to their zero value.

func (*PostFail2banIPParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the post fail2ban Ip params

func (*PostFail2banIPParams) SetIpaddress

func (o *PostFail2banIPParams) SetIpaddress(ipaddress string)

SetIpaddress adds the ipaddress to the post fail2ban Ip params

func (*PostFail2banIPParams) SetTimeout

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

SetTimeout adds the timeout to the post fail2ban Ip params

func (*PostFail2banIPParams) WithContext

WithContext adds the context to the post fail2ban Ip params

func (*PostFail2banIPParams) WithDefaults

func (o *PostFail2banIPParams) WithDefaults() *PostFail2banIPParams

WithDefaults hydrates default values in the post fail2ban Ip params (not the query body).

All values with no default are reset to their zero value.

func (*PostFail2banIPParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the post fail2ban Ip params

func (*PostFail2banIPParams) WithIpaddress

func (o *PostFail2banIPParams) WithIpaddress(ipaddress string) *PostFail2banIPParams

WithIpaddress adds the ipaddress to the post fail2ban Ip params

func (*PostFail2banIPParams) WithTimeout

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

WithTimeout adds the timeout to the post fail2ban Ip params

func (*PostFail2banIPParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PostFail2banIPReader

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

PostFail2banIPReader is a Reader for the PostFail2banIP structure.

func (*PostFail2banIPReader) ReadResponse

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