host_d_b

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 12 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 host d b API

func (*Client) GetHostdbActive

func (a *Client) GetHostdbActive(params *GetHostdbActiveParams, authInfo runtime.ClientAuthInfoWriter) (*GetHostdbActiveOK, error)

GetHostdbActive lists all of the active hosts known to the renter, sorted by preference.

func (*Client) GetHostdbAll

func (a *Client) GetHostdbAll(params *GetHostdbAllParams, authInfo runtime.ClientAuthInfoWriter) (*GetHostdbAllOK, error)

GetHostdbAll lists all of the hosts known to the renter. Hosts are not guaranteed to be in any particular order, and the order may change in subsequent calls.

func (*Client) GetHostdbFiltermode added in v0.5.5

func (a *Client) GetHostdbFiltermode(params *GetHostdbFiltermodeParams, authInfo runtime.ClientAuthInfoWriter) (*GetHostdbFiltermodeOK, error)

GetHostdbFiltermode Returns the current filter mode of the hostDB and any filtered hosts.

func (*Client) GetHostdbHostsPubkey

func (a *Client) GetHostdbHostsPubkey(params *GetHostdbHostsPubkeyParams, authInfo runtime.ClientAuthInfoWriter) (*GetHostdbHostsPubkeyOK, error)

GetHostdbHostsPubkey fetches detailed information about a particular host, including metrics regarding the score of the host within the database. It should be noted that each renter uses different metrics for selecting hosts, and that a good score on in one hostdb does not mean that the host will be successful on the network overall.

func (*Client) PostHostdbFiltermode added in v0.5.5

PostHostdbFiltermode Lets you enable and disable a filter mode for the hostdb. Currently the two modes supported are blacklist mode and whitelist mode.

In blacklist mode, any hosts you identify as being on the blacklist will not be used to form contracts. In whitelist mode, only the hosts identified as being on the whitelist will be used to form contracts. In both modes, hosts that you are blacklisted will be filtered from your hostdb. To enable either mode, set filtermode to the desired mode and submit a list of host pubkeys as the corresponding blacklist or whitelist. To disable either list, the host field can be left blank (e.g. empty slice) and the filtermode should be set to disable.

NOTE: Enabling and disabling a filter mode can result in changes with your current contracts with can result in an increase in contract fee spending. For example, if blacklist mode is enabled, any hosts that you currently have contracts with that are also on the provide list of hosts will have their contracts replaced with non-blacklisted hosts. When whitelist mode is enabled, contracts will be replaced until there are only contracts with whitelisted hosts. Even disabling a filter mode can result in a change in contracts if there are better scoring hosts in your hostdb that were previously being filtered out.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService added in v0.5.9

type ClientService interface {
	GetHostdbActive(params *GetHostdbActiveParams, authInfo runtime.ClientAuthInfoWriter) (*GetHostdbActiveOK, error)

	GetHostdbAll(params *GetHostdbAllParams, authInfo runtime.ClientAuthInfoWriter) (*GetHostdbAllOK, error)

	GetHostdbFiltermode(params *GetHostdbFiltermodeParams, authInfo runtime.ClientAuthInfoWriter) (*GetHostdbFiltermodeOK, error)

	GetHostdbHostsPubkey(params *GetHostdbHostsPubkeyParams, authInfo runtime.ClientAuthInfoWriter) (*GetHostdbHostsPubkeyOK, error)

	PostHostdbFiltermode(params *PostHostdbFiltermodeParams, authInfo runtime.ClientAuthInfoWriter) (*PostHostdbFiltermodeNoContent, 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 host d b API client.

type GetHostdbActiveDefault

type GetHostdbActiveDefault struct {
	Payload *models.StandardError
	// contains filtered or unexported fields
}
GetHostdbActiveDefault describes a response with status code -1, with default header values.

Error Response

func NewGetHostdbActiveDefault

func NewGetHostdbActiveDefault(code int) *GetHostdbActiveDefault

NewGetHostdbActiveDefault creates a GetHostdbActiveDefault with default headers values

func (*GetHostdbActiveDefault) Code

func (o *GetHostdbActiveDefault) Code() int

Code gets the status code for the get hostdb active default response

func (*GetHostdbActiveDefault) Error

func (o *GetHostdbActiveDefault) Error() string

func (*GetHostdbActiveDefault) GetPayload added in v0.5.4

func (o *GetHostdbActiveDefault) GetPayload() *models.StandardError

type GetHostdbActiveOK

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

Successful Response

func NewGetHostdbActiveOK

func NewGetHostdbActiveOK() *GetHostdbActiveOK

NewGetHostdbActiveOK creates a GetHostdbActiveOK with default headers values

func (*GetHostdbActiveOK) Error

func (o *GetHostdbActiveOK) Error() string

func (*GetHostdbActiveOK) GetPayload added in v0.5.4

func (o *GetHostdbActiveOK) GetPayload() *models.Hostdb

type GetHostdbActiveParams

type GetHostdbActiveParams struct {

	/* Numhosts.

	   Number of hosts to return. The actual number of hosts returned may be less if there are insufficient active hosts. Optional, the default is all active hosts.
	*/
	Numhosts *int64

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

GetHostdbActiveParams contains all the parameters to send to the API endpoint

for the get hostdb active operation.

Typically these are written to a http.Request.

func NewGetHostdbActiveParams

func NewGetHostdbActiveParams() *GetHostdbActiveParams

NewGetHostdbActiveParams creates a new GetHostdbActiveParams 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 NewGetHostdbActiveParamsWithContext

func NewGetHostdbActiveParamsWithContext(ctx context.Context) *GetHostdbActiveParams

NewGetHostdbActiveParamsWithContext creates a new GetHostdbActiveParams object with the ability to set a context for a request.

func NewGetHostdbActiveParamsWithHTTPClient

func NewGetHostdbActiveParamsWithHTTPClient(client *http.Client) *GetHostdbActiveParams

NewGetHostdbActiveParamsWithHTTPClient creates a new GetHostdbActiveParams object with the ability to set a custom HTTPClient for a request.

func NewGetHostdbActiveParamsWithTimeout

func NewGetHostdbActiveParamsWithTimeout(timeout time.Duration) *GetHostdbActiveParams

NewGetHostdbActiveParamsWithTimeout creates a new GetHostdbActiveParams object with the ability to set a timeout on a request.

func (*GetHostdbActiveParams) SetContext

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

SetContext adds the context to the get hostdb active params

func (*GetHostdbActiveParams) SetDefaults added in v0.5.9

func (o *GetHostdbActiveParams) SetDefaults()

SetDefaults hydrates default values in the get hostdb active params (not the query body).

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

func (*GetHostdbActiveParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get hostdb active params

func (*GetHostdbActiveParams) SetNumhosts

func (o *GetHostdbActiveParams) SetNumhosts(numhosts *int64)

SetNumhosts adds the numhosts to the get hostdb active params

func (*GetHostdbActiveParams) SetTimeout

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

SetTimeout adds the timeout to the get hostdb active params

func (*GetHostdbActiveParams) WithContext

WithContext adds the context to the get hostdb active params

func (*GetHostdbActiveParams) WithDefaults added in v0.5.9

func (o *GetHostdbActiveParams) WithDefaults() *GetHostdbActiveParams

WithDefaults hydrates default values in the get hostdb active params (not the query body).

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

func (*GetHostdbActiveParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get hostdb active params

func (*GetHostdbActiveParams) WithNumhosts

func (o *GetHostdbActiveParams) WithNumhosts(numhosts *int64) *GetHostdbActiveParams

WithNumhosts adds the numhosts to the get hostdb active params

func (*GetHostdbActiveParams) WithTimeout

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

WithTimeout adds the timeout to the get hostdb active params

func (*GetHostdbActiveParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetHostdbActiveReader

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

GetHostdbActiveReader is a Reader for the GetHostdbActive structure.

func (*GetHostdbActiveReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetHostdbAllDefault

type GetHostdbAllDefault struct {
	Payload *models.StandardError
	// contains filtered or unexported fields
}
GetHostdbAllDefault describes a response with status code -1, with default header values.

Error Response

func NewGetHostdbAllDefault

func NewGetHostdbAllDefault(code int) *GetHostdbAllDefault

NewGetHostdbAllDefault creates a GetHostdbAllDefault with default headers values

func (*GetHostdbAllDefault) Code

func (o *GetHostdbAllDefault) Code() int

Code gets the status code for the get hostdb all default response

func (*GetHostdbAllDefault) Error

func (o *GetHostdbAllDefault) Error() string

func (*GetHostdbAllDefault) GetPayload added in v0.5.4

func (o *GetHostdbAllDefault) GetPayload() *models.StandardError

type GetHostdbAllOK

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

Successful Response

func NewGetHostdbAllOK

func NewGetHostdbAllOK() *GetHostdbAllOK

NewGetHostdbAllOK creates a GetHostdbAllOK with default headers values

func (*GetHostdbAllOK) Error

func (o *GetHostdbAllOK) Error() string

func (*GetHostdbAllOK) GetPayload added in v0.5.4

func (o *GetHostdbAllOK) GetPayload() *models.Hostdb

type GetHostdbAllParams

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

GetHostdbAllParams contains all the parameters to send to the API endpoint

for the get hostdb all operation.

Typically these are written to a http.Request.

func NewGetHostdbAllParams

func NewGetHostdbAllParams() *GetHostdbAllParams

NewGetHostdbAllParams creates a new GetHostdbAllParams 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 NewGetHostdbAllParamsWithContext

func NewGetHostdbAllParamsWithContext(ctx context.Context) *GetHostdbAllParams

NewGetHostdbAllParamsWithContext creates a new GetHostdbAllParams object with the ability to set a context for a request.

func NewGetHostdbAllParamsWithHTTPClient

func NewGetHostdbAllParamsWithHTTPClient(client *http.Client) *GetHostdbAllParams

NewGetHostdbAllParamsWithHTTPClient creates a new GetHostdbAllParams object with the ability to set a custom HTTPClient for a request.

func NewGetHostdbAllParamsWithTimeout

func NewGetHostdbAllParamsWithTimeout(timeout time.Duration) *GetHostdbAllParams

NewGetHostdbAllParamsWithTimeout creates a new GetHostdbAllParams object with the ability to set a timeout on a request.

func (*GetHostdbAllParams) SetContext

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

SetContext adds the context to the get hostdb all params

func (*GetHostdbAllParams) SetDefaults added in v0.5.9

func (o *GetHostdbAllParams) SetDefaults()

SetDefaults hydrates default values in the get hostdb all params (not the query body).

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

func (*GetHostdbAllParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get hostdb all params

func (*GetHostdbAllParams) SetTimeout

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

SetTimeout adds the timeout to the get hostdb all params

func (*GetHostdbAllParams) WithContext

WithContext adds the context to the get hostdb all params

func (*GetHostdbAllParams) WithDefaults added in v0.5.9

func (o *GetHostdbAllParams) WithDefaults() *GetHostdbAllParams

WithDefaults hydrates default values in the get hostdb all params (not the query body).

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

func (*GetHostdbAllParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get hostdb all params

func (*GetHostdbAllParams) WithTimeout

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

WithTimeout adds the timeout to the get hostdb all params

func (*GetHostdbAllParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetHostdbAllReader

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

GetHostdbAllReader is a Reader for the GetHostdbAll structure.

func (*GetHostdbAllReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetHostdbFiltermodeDefault added in v0.5.5

type GetHostdbFiltermodeDefault struct {
	Payload *models.StandardError
	// contains filtered or unexported fields
}
GetHostdbFiltermodeDefault describes a response with status code -1, with default header values.

Error Response

func NewGetHostdbFiltermodeDefault added in v0.5.5

func NewGetHostdbFiltermodeDefault(code int) *GetHostdbFiltermodeDefault

NewGetHostdbFiltermodeDefault creates a GetHostdbFiltermodeDefault with default headers values

func (*GetHostdbFiltermodeDefault) Code added in v0.5.5

func (o *GetHostdbFiltermodeDefault) Code() int

Code gets the status code for the get hostdb filtermode default response

func (*GetHostdbFiltermodeDefault) Error added in v0.5.5

func (*GetHostdbFiltermodeDefault) GetPayload added in v0.5.5

type GetHostdbFiltermodeOK added in v0.5.5

type GetHostdbFiltermodeOK struct {
	Payload *GetHostdbFiltermodeOKBody
}
GetHostdbFiltermodeOK describes a response with status code 200, with default header values.

Successful Response

func NewGetHostdbFiltermodeOK added in v0.5.5

func NewGetHostdbFiltermodeOK() *GetHostdbFiltermodeOK

NewGetHostdbFiltermodeOK creates a GetHostdbFiltermodeOK with default headers values

func (*GetHostdbFiltermodeOK) Error added in v0.5.5

func (o *GetHostdbFiltermodeOK) Error() string

func (*GetHostdbFiltermodeOK) GetPayload added in v0.5.5

type GetHostdbFiltermodeOKBody added in v0.5.5

type GetHostdbFiltermodeOKBody struct {

	// Can be either whitelist, blacklist, or disable.
	Filtermode string `json:"filtermode,omitempty"`

	// array of strings Comma separated pubkeys.
	Hosts []string `json:"hosts"`
}

GetHostdbFiltermodeOKBody get hostdb filtermode o k body swagger:model GetHostdbFiltermodeOKBody

func (*GetHostdbFiltermodeOKBody) ContextValidate added in v0.5.9

func (o *GetHostdbFiltermodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this get hostdb filtermode o k body based on context it is used

func (*GetHostdbFiltermodeOKBody) MarshalBinary added in v0.5.5

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

MarshalBinary interface implementation

func (*GetHostdbFiltermodeOKBody) UnmarshalBinary added in v0.5.5

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

UnmarshalBinary interface implementation

func (*GetHostdbFiltermodeOKBody) Validate added in v0.5.5

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

Validate validates this get hostdb filtermode o k body

type GetHostdbFiltermodeParams added in v0.5.5

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

GetHostdbFiltermodeParams contains all the parameters to send to the API endpoint

for the get hostdb filtermode operation.

Typically these are written to a http.Request.

func NewGetHostdbFiltermodeParams added in v0.5.5

func NewGetHostdbFiltermodeParams() *GetHostdbFiltermodeParams

NewGetHostdbFiltermodeParams creates a new GetHostdbFiltermodeParams 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 NewGetHostdbFiltermodeParamsWithContext added in v0.5.5

func NewGetHostdbFiltermodeParamsWithContext(ctx context.Context) *GetHostdbFiltermodeParams

NewGetHostdbFiltermodeParamsWithContext creates a new GetHostdbFiltermodeParams object with the ability to set a context for a request.

func NewGetHostdbFiltermodeParamsWithHTTPClient added in v0.5.5

func NewGetHostdbFiltermodeParamsWithHTTPClient(client *http.Client) *GetHostdbFiltermodeParams

NewGetHostdbFiltermodeParamsWithHTTPClient creates a new GetHostdbFiltermodeParams object with the ability to set a custom HTTPClient for a request.

func NewGetHostdbFiltermodeParamsWithTimeout added in v0.5.5

func NewGetHostdbFiltermodeParamsWithTimeout(timeout time.Duration) *GetHostdbFiltermodeParams

NewGetHostdbFiltermodeParamsWithTimeout creates a new GetHostdbFiltermodeParams object with the ability to set a timeout on a request.

func (*GetHostdbFiltermodeParams) SetContext added in v0.5.5

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

SetContext adds the context to the get hostdb filtermode params

func (*GetHostdbFiltermodeParams) SetDefaults added in v0.5.9

func (o *GetHostdbFiltermodeParams) SetDefaults()

SetDefaults hydrates default values in the get hostdb filtermode params (not the query body).

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

func (*GetHostdbFiltermodeParams) SetHTTPClient added in v0.5.5

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

SetHTTPClient adds the HTTPClient to the get hostdb filtermode params

func (*GetHostdbFiltermodeParams) SetTimeout added in v0.5.5

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

SetTimeout adds the timeout to the get hostdb filtermode params

func (*GetHostdbFiltermodeParams) WithContext added in v0.5.5

WithContext adds the context to the get hostdb filtermode params

func (*GetHostdbFiltermodeParams) WithDefaults added in v0.5.9

WithDefaults hydrates default values in the get hostdb filtermode params (not the query body).

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

func (*GetHostdbFiltermodeParams) WithHTTPClient added in v0.5.5

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

WithHTTPClient adds the HTTPClient to the get hostdb filtermode params

func (*GetHostdbFiltermodeParams) WithTimeout added in v0.5.5

WithTimeout adds the timeout to the get hostdb filtermode params

func (*GetHostdbFiltermodeParams) WriteToRequest added in v0.5.5

WriteToRequest writes these params to a swagger request

type GetHostdbFiltermodeReader added in v0.5.5

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

GetHostdbFiltermodeReader is a Reader for the GetHostdbFiltermode structure.

func (*GetHostdbFiltermodeReader) ReadResponse added in v0.5.5

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

ReadResponse reads a server response into the received o.

type GetHostdbHostsPubkeyDefault

type GetHostdbHostsPubkeyDefault struct {
	Payload *models.StandardError
	// contains filtered or unexported fields
}
GetHostdbHostsPubkeyDefault describes a response with status code -1, with default header values.

Error Response

func NewGetHostdbHostsPubkeyDefault

func NewGetHostdbHostsPubkeyDefault(code int) *GetHostdbHostsPubkeyDefault

NewGetHostdbHostsPubkeyDefault creates a GetHostdbHostsPubkeyDefault with default headers values

func (*GetHostdbHostsPubkeyDefault) Code

func (o *GetHostdbHostsPubkeyDefault) Code() int

Code gets the status code for the get hostdb hosts pubkey default response

func (*GetHostdbHostsPubkeyDefault) Error

func (*GetHostdbHostsPubkeyDefault) GetPayload added in v0.5.4

type GetHostdbHostsPubkeyOK

type GetHostdbHostsPubkeyOK struct {
	Payload *GetHostdbHostsPubkeyOKBody
}
GetHostdbHostsPubkeyOK describes a response with status code 200, with default header values.

Successful Response

func NewGetHostdbHostsPubkeyOK

func NewGetHostdbHostsPubkeyOK() *GetHostdbHostsPubkeyOK

NewGetHostdbHostsPubkeyOK creates a GetHostdbHostsPubkeyOK with default headers values

func (*GetHostdbHostsPubkeyOK) Error

func (o *GetHostdbHostsPubkeyOK) Error() string

func (*GetHostdbHostsPubkeyOK) GetPayload added in v0.5.4

type GetHostdbHostsPubkeyOKBody

type GetHostdbHostsPubkeyOKBody struct {

	// entry
	Entry *GetHostdbHostsPubkeyOKBodyEntry `json:"entry,omitempty"`
}

GetHostdbHostsPubkeyOKBody get hostdb hosts pubkey o k body swagger:model GetHostdbHostsPubkeyOKBody

func (*GetHostdbHostsPubkeyOKBody) ContextValidate added in v0.5.9

func (o *GetHostdbHostsPubkeyOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get hostdb hosts pubkey o k body based on the context it is used

func (*GetHostdbHostsPubkeyOKBody) MarshalBinary

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

MarshalBinary interface implementation

func (*GetHostdbHostsPubkeyOKBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*GetHostdbHostsPubkeyOKBody) Validate

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

Validate validates this get hostdb hosts pubkey o k body

type GetHostdbHostsPubkeyOKBodyEntry

type GetHostdbHostsPubkeyOKBodyEntry struct {

	// true if the host is accepting new contracts.
	// Example: true
	Acceptingcontracts bool `json:"acceptingcontracts,omitempty"`

	// Maximum number of bytes that the host will allow to be requested by a single download request.
	// Example: 17825792
	Maxdownloadbatchsize int64 `json:"maxdownloadbatchsize,omitempty"`

	// Maximum duration in blocks that a host will allow for a file contract.
	// The host commits to keeping files for the full duration under the
	// threat of facing a large penalty for losing or dropping data before
	// the duration is complete. The storage proof window of an incoming file
	// contract must end before the current height + maxduration.
	// There is a block approximately every 10 minutes.
	// e.g. 1 day = 144 blocks
	//
	// Example: 25920
	Maxduration int64 `json:"maxduration,omitempty"`

	// Maximum size in bytes of a single batch of file contract
	// revisions. Larger batch sizes allow for higher throughput as there is
	// significant communication overhead associated with performing a batch
	// upload.
	//
	// Example: 17825792
	Maxrevisebatchsize int64 `json:"maxrevisebatchsize,omitempty"`

	// Remote address of the host. It can be an IPv4, IPv6, or hostname, along with the port. IPv6 addresses are enclosed in square brackets.
	// Example: 123.456.789.0:9982
	Netaddress string `json:"netaddress,omitempty"`

	// publickey
	Publickey *GetHostdbHostsPubkeyOKBodyEntryPublickey `json:"publickey,omitempty"`

	// The string representation of the full public key, used when calling /hostdb/hosts.
	// Example: ed25519:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
	Publickeystring string `json:"publickeystring,omitempty"`

	// Unused storage capacity the host claims it has, in bytes.
	// Example: 35000000000
	Remainingstorage int64 `json:"remainingstorage,omitempty"`

	// scorebreakdown
	Scorebreakdown *GetHostdbHostsPubkeyOKBodyEntryScorebreakdown `json:"scorebreakdown,omitempty"`

	// Smallest amount of data in bytes that can be uploaded or downloaded to or from the host.
	// Example: 4194304
	Sectorsize int64 `json:"sectorsize,omitempty"`

	// Total amount of storage capacity the host claims it has, in bytes.
	// Example: 35000000000
	Totalstorage int64 `json:"totalstorage,omitempty"`

	// Address at which the host can be paid when forming file contracts.
	// Example: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab
	Unlockhash string `json:"unlockhash,omitempty"`

	// A storage proof window is the number of blocks that the host has to
	// get a storage proof onto the blockchain. The window size is the
	// minimum size of window that the host will accept in a file contract.
	//
	// Example: 144
	Windowsize int64 `json:"windowsize,omitempty"`
}

GetHostdbHostsPubkeyOKBodyEntry get hostdb hosts pubkey o k body entry swagger:model GetHostdbHostsPubkeyOKBodyEntry

func (*GetHostdbHostsPubkeyOKBodyEntry) ContextValidate added in v0.5.9

func (o *GetHostdbHostsPubkeyOKBodyEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get hostdb hosts pubkey o k body entry based on the context it is used

func (*GetHostdbHostsPubkeyOKBodyEntry) MarshalBinary

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

MarshalBinary interface implementation

func (*GetHostdbHostsPubkeyOKBodyEntry) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*GetHostdbHostsPubkeyOKBodyEntry) Validate

Validate validates this get hostdb hosts pubkey o k body entry

type GetHostdbHostsPubkeyOKBodyEntryPublickey

type GetHostdbHostsPubkeyOKBodyEntryPublickey struct {

	// Algorithm used for signing and verification. Typically "ed25519".
	// Example: ed25519
	Algorithm string `json:"algorithm,omitempty"`

	// Key used to verify signed host messages.
	// Example: RW50cm9weSBpc24ndCB3aGF0IGl0IHVzZWQgdG8gYmU=
	Key string `json:"key,omitempty"`
}

GetHostdbHostsPubkeyOKBodyEntryPublickey Public key used to identify and verify hosts. swagger:model GetHostdbHostsPubkeyOKBodyEntryPublickey

func (*GetHostdbHostsPubkeyOKBodyEntryPublickey) ContextValidate added in v0.5.9

ContextValidate validates this get hostdb hosts pubkey o k body entry publickey based on context it is used

func (*GetHostdbHostsPubkeyOKBodyEntryPublickey) MarshalBinary

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

MarshalBinary interface implementation

func (*GetHostdbHostsPubkeyOKBodyEntryPublickey) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*GetHostdbHostsPubkeyOKBodyEntryPublickey) Validate

Validate validates this get hostdb hosts pubkey o k body entry publickey

type GetHostdbHostsPubkeyOKBodyEntryScorebreakdown

type GetHostdbHostsPubkeyOKBodyEntryScorebreakdown struct {

	// The multiplier that gets applied to the host based on how long it has been a host. Older hosts typically have a lower penalty.
	// Example: 0.1234
	Ageadjustment int64 `json:"ageadjustment,omitempty"`

	// The multiplier that gets applied to the host based on how much proof-of-burn the host has performed. More burn causes a linear increase in score.
	// Example: 23.456
	Burnadjustment int64 `json:"burnadjustment,omitempty"`

	// The multiplier that gets applied to a host based on how much collateral the host is offering. More collateral is typically better, though above a point it can be detrimental.
	// Example: 23.456
	Collateraladjustment int64 `json:"collateraladjustment,omitempty"`

	// The multiplier that gets applied to a host based on the host's price. Lower prices are almost always better. Below a certain, very low price, there is no advantage.
	// Example: 0.1234
	Priceadjustment int64 `json:"priceadjustment,omitempty"`

	// The overall score for the host. Scores are entriely relative, and are
	// consistent only within the current hostdb. Between different machines,
	// different configurations, and different versions the absolute scores for
	// a given host can be off by many orders of magnitude. When displaying to a
	// human, some form of normalization with respect to the other hosts (for
	// example, divide all scores by the median score of the hosts) is
	// recommended.
	//
	// Example: 123456
	Score int64 `json:"score,omitempty"`

	// The multiplier that gets applied to a host based on how much storage is remaining for the host. More storage remaining is better, to a point.
	// Example: 0.1234
	Storageremainingadjustment int64 `json:"storageremainingadjustment,omitempty"`

	// The multiplier that gets applied to a host based on the uptime percentage of the host. The penalty increases extremely quickly as uptime drops below 90%.
	// Example: 0.1234
	Uptimeadjustment int64 `json:"uptimeadjustment,omitempty"`

	// The multiplier that gets applied to a host based on the version of Sia
	// that they are running. Versions get penalties if there are known bugs,
	// scaling limitations, performance limitations, etc. Generally, the most
	// recent version is always the one with the highest score.
	//
	// Example: 0.1234
	Versionadjustment int64 `json:"versionadjustment,omitempty"`
}

GetHostdbHostsPubkeyOKBodyEntryScorebreakdown A set of scores as determined by the renter. Generally, the host's final // final score is all of the values multiplied together. Modified renters may // have additional criteria that they use to judge a host, or may ignore // certin criteia. In general, these fields should only be used as a loose // guide for the score of a host, as every renter sees the world differently // and uses different metrics to evaluate hosts. // swagger:model GetHostdbHostsPubkeyOKBodyEntryScorebreakdown

func (*GetHostdbHostsPubkeyOKBodyEntryScorebreakdown) ContextValidate added in v0.5.9

ContextValidate validates this get hostdb hosts pubkey o k body entry scorebreakdown based on context it is used

func (*GetHostdbHostsPubkeyOKBodyEntryScorebreakdown) MarshalBinary

MarshalBinary interface implementation

func (*GetHostdbHostsPubkeyOKBodyEntryScorebreakdown) UnmarshalBinary

UnmarshalBinary interface implementation

func (*GetHostdbHostsPubkeyOKBodyEntryScorebreakdown) Validate

Validate validates this get hostdb hosts pubkey o k body entry scorebreakdown

type GetHostdbHostsPubkeyParams

type GetHostdbHostsPubkeyParams struct {

	/* Pubkey.

	   The public key of the host. Each public key identifies a single host.
	*/
	Pubkey string

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

GetHostdbHostsPubkeyParams contains all the parameters to send to the API endpoint

for the get hostdb hosts pubkey operation.

Typically these are written to a http.Request.

func NewGetHostdbHostsPubkeyParams

func NewGetHostdbHostsPubkeyParams() *GetHostdbHostsPubkeyParams

NewGetHostdbHostsPubkeyParams creates a new GetHostdbHostsPubkeyParams 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 NewGetHostdbHostsPubkeyParamsWithContext

func NewGetHostdbHostsPubkeyParamsWithContext(ctx context.Context) *GetHostdbHostsPubkeyParams

NewGetHostdbHostsPubkeyParamsWithContext creates a new GetHostdbHostsPubkeyParams object with the ability to set a context for a request.

func NewGetHostdbHostsPubkeyParamsWithHTTPClient

func NewGetHostdbHostsPubkeyParamsWithHTTPClient(client *http.Client) *GetHostdbHostsPubkeyParams

NewGetHostdbHostsPubkeyParamsWithHTTPClient creates a new GetHostdbHostsPubkeyParams object with the ability to set a custom HTTPClient for a request.

func NewGetHostdbHostsPubkeyParamsWithTimeout

func NewGetHostdbHostsPubkeyParamsWithTimeout(timeout time.Duration) *GetHostdbHostsPubkeyParams

NewGetHostdbHostsPubkeyParamsWithTimeout creates a new GetHostdbHostsPubkeyParams object with the ability to set a timeout on a request.

func (*GetHostdbHostsPubkeyParams) SetContext

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

SetContext adds the context to the get hostdb hosts pubkey params

func (*GetHostdbHostsPubkeyParams) SetDefaults added in v0.5.9

func (o *GetHostdbHostsPubkeyParams) SetDefaults()

SetDefaults hydrates default values in the get hostdb hosts pubkey params (not the query body).

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

func (*GetHostdbHostsPubkeyParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get hostdb hosts pubkey params

func (*GetHostdbHostsPubkeyParams) SetPubkey

func (o *GetHostdbHostsPubkeyParams) SetPubkey(pubkey string)

SetPubkey adds the pubkey to the get hostdb hosts pubkey params

func (*GetHostdbHostsPubkeyParams) SetTimeout

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

SetTimeout adds the timeout to the get hostdb hosts pubkey params

func (*GetHostdbHostsPubkeyParams) WithContext

WithContext adds the context to the get hostdb hosts pubkey params

func (*GetHostdbHostsPubkeyParams) WithDefaults added in v0.5.9

WithDefaults hydrates default values in the get hostdb hosts pubkey params (not the query body).

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

func (*GetHostdbHostsPubkeyParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the get hostdb hosts pubkey params

func (*GetHostdbHostsPubkeyParams) WithPubkey

WithPubkey adds the pubkey to the get hostdb hosts pubkey params

func (*GetHostdbHostsPubkeyParams) WithTimeout

WithTimeout adds the timeout to the get hostdb hosts pubkey params

func (*GetHostdbHostsPubkeyParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetHostdbHostsPubkeyReader

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

GetHostdbHostsPubkeyReader is a Reader for the GetHostdbHostsPubkey structure.

func (*GetHostdbHostsPubkeyReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PostHostdbFiltermodeBody added in v0.5.5

type PostHostdbFiltermodeBody struct {

	// Can be either whitelist, blacklist, or disable.
	// Required: true
	Filtermode *string `json:"filtermode"`

	// pubkeys.
	Hosts []string `json:"hosts"`
}

PostHostdbFiltermodeBody post hostdb filtermode body swagger:model PostHostdbFiltermodeBody

func (*PostHostdbFiltermodeBody) ContextValidate added in v0.5.9

func (o *PostHostdbFiltermodeBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this post hostdb filtermode body based on context it is used

func (*PostHostdbFiltermodeBody) MarshalBinary added in v0.5.5

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

MarshalBinary interface implementation

func (*PostHostdbFiltermodeBody) UnmarshalBinary added in v0.5.5

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

UnmarshalBinary interface implementation

func (*PostHostdbFiltermodeBody) Validate added in v0.5.5

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

Validate validates this post hostdb filtermode body

type PostHostdbFiltermodeDefault added in v0.5.5

type PostHostdbFiltermodeDefault struct {
	Payload *models.StandardError
	// contains filtered or unexported fields
}
PostHostdbFiltermodeDefault describes a response with status code -1, with default header values.

Error Response

func NewPostHostdbFiltermodeDefault added in v0.5.5

func NewPostHostdbFiltermodeDefault(code int) *PostHostdbFiltermodeDefault

NewPostHostdbFiltermodeDefault creates a PostHostdbFiltermodeDefault with default headers values

func (*PostHostdbFiltermodeDefault) Code added in v0.5.5

func (o *PostHostdbFiltermodeDefault) Code() int

Code gets the status code for the post hostdb filtermode default response

func (*PostHostdbFiltermodeDefault) Error added in v0.5.5

func (*PostHostdbFiltermodeDefault) GetPayload added in v0.5.5

type PostHostdbFiltermodeNoContent added in v0.5.5

type PostHostdbFiltermodeNoContent struct {
}
PostHostdbFiltermodeNoContent describes a response with status code 204, with default header values.

Successful Response

func NewPostHostdbFiltermodeNoContent added in v0.5.5

func NewPostHostdbFiltermodeNoContent() *PostHostdbFiltermodeNoContent

NewPostHostdbFiltermodeNoContent creates a PostHostdbFiltermodeNoContent with default headers values

func (*PostHostdbFiltermodeNoContent) Error added in v0.5.5

type PostHostdbFiltermodeParams added in v0.5.5

type PostHostdbFiltermodeParams struct {

	// Mode.
	Mode PostHostdbFiltermodeBody

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

PostHostdbFiltermodeParams contains all the parameters to send to the API endpoint

for the post hostdb filtermode operation.

Typically these are written to a http.Request.

func NewPostHostdbFiltermodeParams added in v0.5.5

func NewPostHostdbFiltermodeParams() *PostHostdbFiltermodeParams

NewPostHostdbFiltermodeParams creates a new PostHostdbFiltermodeParams 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 NewPostHostdbFiltermodeParamsWithContext added in v0.5.5

func NewPostHostdbFiltermodeParamsWithContext(ctx context.Context) *PostHostdbFiltermodeParams

NewPostHostdbFiltermodeParamsWithContext creates a new PostHostdbFiltermodeParams object with the ability to set a context for a request.

func NewPostHostdbFiltermodeParamsWithHTTPClient added in v0.5.5

func NewPostHostdbFiltermodeParamsWithHTTPClient(client *http.Client) *PostHostdbFiltermodeParams

NewPostHostdbFiltermodeParamsWithHTTPClient creates a new PostHostdbFiltermodeParams object with the ability to set a custom HTTPClient for a request.

func NewPostHostdbFiltermodeParamsWithTimeout added in v0.5.5

func NewPostHostdbFiltermodeParamsWithTimeout(timeout time.Duration) *PostHostdbFiltermodeParams

NewPostHostdbFiltermodeParamsWithTimeout creates a new PostHostdbFiltermodeParams object with the ability to set a timeout on a request.

func (*PostHostdbFiltermodeParams) SetContext added in v0.5.5

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

SetContext adds the context to the post hostdb filtermode params

func (*PostHostdbFiltermodeParams) SetDefaults added in v0.5.9

func (o *PostHostdbFiltermodeParams) SetDefaults()

SetDefaults hydrates default values in the post hostdb filtermode params (not the query body).

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

func (*PostHostdbFiltermodeParams) SetHTTPClient added in v0.5.5

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

SetHTTPClient adds the HTTPClient to the post hostdb filtermode params

func (*PostHostdbFiltermodeParams) SetMode added in v0.5.5

SetMode adds the mode to the post hostdb filtermode params

func (*PostHostdbFiltermodeParams) SetTimeout added in v0.5.5

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

SetTimeout adds the timeout to the post hostdb filtermode params

func (*PostHostdbFiltermodeParams) WithContext added in v0.5.5

WithContext adds the context to the post hostdb filtermode params

func (*PostHostdbFiltermodeParams) WithDefaults added in v0.5.9

WithDefaults hydrates default values in the post hostdb filtermode params (not the query body).

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

func (*PostHostdbFiltermodeParams) WithHTTPClient added in v0.5.5

WithHTTPClient adds the HTTPClient to the post hostdb filtermode params

func (*PostHostdbFiltermodeParams) WithMode added in v0.5.5

WithMode adds the mode to the post hostdb filtermode params

func (*PostHostdbFiltermodeParams) WithTimeout added in v0.5.5

WithTimeout adds the timeout to the post hostdb filtermode params

func (*PostHostdbFiltermodeParams) WriteToRequest added in v0.5.5

WriteToRequest writes these params to a swagger request

type PostHostdbFiltermodeReader added in v0.5.5

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

PostHostdbFiltermodeReader is a Reader for the PostHostdbFiltermode structure.

func (*PostHostdbFiltermodeReader) ReadResponse added in v0.5.5

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