Documentation ¶
Overview ¶
Package dofusportals provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (swagger *openapi3.T, err error)
- func NewGetExternalV1DimensionsRequest(server string) (*http.Request, error)
- func NewGetExternalV1ServersRequest(server string) (*http.Request, error)
- func NewGetExternalV1ServersServerIdPortalsDimensionIdHistoryRequest(server string, serverId string, dimensionId string) (*http.Request, error)
- func NewGetExternalV1ServersServerIdPortalsDimensionIdRequest(server string, serverId string, dimensionId string) (*http.Request, error)
- func NewGetExternalV1ServersServerIdPortalsRequest(server string, serverId string) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type Client
- func (c *Client) GetExternalV1Dimensions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetExternalV1Servers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetExternalV1ServersServerIdPortals(ctx context.Context, serverId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetExternalV1ServersServerIdPortalsDimensionId(ctx context.Context, serverId string, dimensionId string, ...) (*http.Response, error)
- func (c *Client) GetExternalV1ServersServerIdPortalsDimensionIdHistory(ctx context.Context, serverId string, dimensionId string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetExternalV1DimensionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetExternalV1DimensionsResponse, error)
- func (c *ClientWithResponses) GetExternalV1ServersServerIdPortalsDimensionIdHistoryWithResponse(ctx context.Context, serverId string, dimensionId string, ...) (*GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse, error)
- func (c *ClientWithResponses) GetExternalV1ServersServerIdPortalsDimensionIdWithResponse(ctx context.Context, serverId string, dimensionId string, ...) (*GetExternalV1ServersServerIdPortalsDimensionIdResponse, error)
- func (c *ClientWithResponses) GetExternalV1ServersServerIdPortalsWithResponse(ctx context.Context, serverId string, reqEditors ...RequestEditorFn) (*GetExternalV1ServersServerIdPortalsResponse, error)
- func (c *ClientWithResponses) GetExternalV1ServersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetExternalV1ServersResponse, error)
- type ClientWithResponsesInterface
- type Dimension
- type GetExternalV1DimensionsResponse
- type GetExternalV1ServersResponse
- type GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse
- type GetExternalV1ServersServerIdPortalsDimensionIdResponse
- type GetExternalV1ServersServerIdPortalsResponse
- type HttpRequestDoer
- type IntendedError
- type IntendedErrorError
- type IntendedErrorResponse
- type Portal
- type PortalHistory
- type Position
- type RequestEditorFn
- type Server
- type ServerCommunity
- type ServerType
- type Transport
- type TransportType
- type User
Constants ¶
const (
ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func NewGetExternalV1DimensionsRequest ¶
NewGetExternalV1DimensionsRequest generates requests for GetExternalV1Dimensions
func NewGetExternalV1ServersRequest ¶
NewGetExternalV1ServersRequest generates requests for GetExternalV1Servers
func NewGetExternalV1ServersServerIdPortalsDimensionIdHistoryRequest ¶
func NewGetExternalV1ServersServerIdPortalsDimensionIdHistoryRequest(server string, serverId string, dimensionId string) (*http.Request, error)
NewGetExternalV1ServersServerIdPortalsDimensionIdHistoryRequest generates requests for GetExternalV1ServersServerIdPortalsDimensionIdHistory
func NewGetExternalV1ServersServerIdPortalsDimensionIdRequest ¶
func NewGetExternalV1ServersServerIdPortalsDimensionIdRequest(server string, serverId string, dimensionId string) (*http.Request, error)
NewGetExternalV1ServersServerIdPortalsDimensionIdRequest generates requests for GetExternalV1ServersServerIdPortalsDimensionId
Types ¶
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetExternalV1Dimensions ¶
func (*Client) GetExternalV1Servers ¶
func (*Client) GetExternalV1ServersServerIdPortals ¶
func (*Client) GetExternalV1ServersServerIdPortalsDimensionId ¶
type ClientInterface ¶
type ClientInterface interface { // GetExternalV1Dimensions request GetExternalV1Dimensions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetExternalV1Servers request GetExternalV1Servers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetExternalV1ServersServerIdPortals request GetExternalV1ServersServerIdPortals(ctx context.Context, serverId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetExternalV1ServersServerIdPortalsDimensionId request GetExternalV1ServersServerIdPortalsDimensionId(ctx context.Context, serverId string, dimensionId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetExternalV1ServersServerIdPortalsDimensionIdHistory request GetExternalV1ServersServerIdPortalsDimensionIdHistory(ctx context.Context, serverId string, dimensionId string, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetExternalV1DimensionsWithResponse ¶
func (c *ClientWithResponses) GetExternalV1DimensionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetExternalV1DimensionsResponse, error)
GetExternalV1DimensionsWithResponse request returning *GetExternalV1DimensionsResponse
func (*ClientWithResponses) GetExternalV1ServersServerIdPortalsDimensionIdHistoryWithResponse ¶
func (c *ClientWithResponses) GetExternalV1ServersServerIdPortalsDimensionIdHistoryWithResponse(ctx context.Context, serverId string, dimensionId string, reqEditors ...RequestEditorFn) (*GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse, error)
GetExternalV1ServersServerIdPortalsDimensionIdHistoryWithResponse request returning *GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse
func (*ClientWithResponses) GetExternalV1ServersServerIdPortalsDimensionIdWithResponse ¶
func (c *ClientWithResponses) GetExternalV1ServersServerIdPortalsDimensionIdWithResponse(ctx context.Context, serverId string, dimensionId string, reqEditors ...RequestEditorFn) (*GetExternalV1ServersServerIdPortalsDimensionIdResponse, error)
GetExternalV1ServersServerIdPortalsDimensionIdWithResponse request returning *GetExternalV1ServersServerIdPortalsDimensionIdResponse
func (*ClientWithResponses) GetExternalV1ServersServerIdPortalsWithResponse ¶
func (c *ClientWithResponses) GetExternalV1ServersServerIdPortalsWithResponse(ctx context.Context, serverId string, reqEditors ...RequestEditorFn) (*GetExternalV1ServersServerIdPortalsResponse, error)
GetExternalV1ServersServerIdPortalsWithResponse request returning *GetExternalV1ServersServerIdPortalsResponse
func (*ClientWithResponses) GetExternalV1ServersWithResponse ¶
func (c *ClientWithResponses) GetExternalV1ServersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetExternalV1ServersResponse, error)
GetExternalV1ServersWithResponse request returning *GetExternalV1ServersResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetExternalV1DimensionsWithResponse request GetExternalV1DimensionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetExternalV1DimensionsResponse, error) // GetExternalV1ServersWithResponse request GetExternalV1ServersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetExternalV1ServersResponse, error) // GetExternalV1ServersServerIdPortalsWithResponse request GetExternalV1ServersServerIdPortalsWithResponse(ctx context.Context, serverId string, reqEditors ...RequestEditorFn) (*GetExternalV1ServersServerIdPortalsResponse, error) // GetExternalV1ServersServerIdPortalsDimensionIdWithResponse request GetExternalV1ServersServerIdPortalsDimensionIdWithResponse(ctx context.Context, serverId string, dimensionId string, reqEditors ...RequestEditorFn) (*GetExternalV1ServersServerIdPortalsDimensionIdResponse, error) // GetExternalV1ServersServerIdPortalsDimensionIdHistoryWithResponse request GetExternalV1ServersServerIdPortalsDimensionIdHistoryWithResponse(ctx context.Context, serverId string, dimensionId string, reqEditors ...RequestEditorFn) (*GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Dimension ¶
type Dimension struct { // Id Name of the dimension, used as an id. Id string `json:"id"` }
Dimension Dofus game dimension
type GetExternalV1DimensionsResponse ¶
type GetExternalV1DimensionsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]Dimension JSON400 *IntendedErrorResponse }
func ParseGetExternalV1DimensionsResponse ¶
func ParseGetExternalV1DimensionsResponse(rsp *http.Response) (*GetExternalV1DimensionsResponse, error)
ParseGetExternalV1DimensionsResponse parses an HTTP response from a GetExternalV1DimensionsWithResponse call
func (GetExternalV1DimensionsResponse) Status ¶
func (r GetExternalV1DimensionsResponse) Status() string
Status returns HTTPResponse.Status
func (GetExternalV1DimensionsResponse) StatusCode ¶
func (r GetExternalV1DimensionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetExternalV1ServersResponse ¶
type GetExternalV1ServersResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]Server JSON400 *IntendedErrorResponse }
func ParseGetExternalV1ServersResponse ¶
func ParseGetExternalV1ServersResponse(rsp *http.Response) (*GetExternalV1ServersResponse, error)
ParseGetExternalV1ServersResponse parses an HTTP response from a GetExternalV1ServersWithResponse call
func (GetExternalV1ServersResponse) Status ¶
func (r GetExternalV1ServersResponse) Status() string
Status returns HTTPResponse.Status
func (GetExternalV1ServersResponse) StatusCode ¶
func (r GetExternalV1ServersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse ¶
type GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]PortalHistory JSON400 *IntendedErrorResponse }
func ParseGetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse ¶
func ParseGetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse(rsp *http.Response) (*GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse, error)
ParseGetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse parses an HTTP response from a GetExternalV1ServersServerIdPortalsDimensionIdHistoryWithResponse call
func (GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse) Status ¶
func (r GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse) Status() string
Status returns HTTPResponse.Status
func (GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse) StatusCode ¶
func (r GetExternalV1ServersServerIdPortalsDimensionIdHistoryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetExternalV1ServersServerIdPortalsDimensionIdResponse ¶
type GetExternalV1ServersServerIdPortalsDimensionIdResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Portal JSON400 *IntendedErrorResponse }
func ParseGetExternalV1ServersServerIdPortalsDimensionIdResponse ¶
func ParseGetExternalV1ServersServerIdPortalsDimensionIdResponse(rsp *http.Response) (*GetExternalV1ServersServerIdPortalsDimensionIdResponse, error)
ParseGetExternalV1ServersServerIdPortalsDimensionIdResponse parses an HTTP response from a GetExternalV1ServersServerIdPortalsDimensionIdWithResponse call
func (GetExternalV1ServersServerIdPortalsDimensionIdResponse) Status ¶
func (r GetExternalV1ServersServerIdPortalsDimensionIdResponse) Status() string
Status returns HTTPResponse.Status
func (GetExternalV1ServersServerIdPortalsDimensionIdResponse) StatusCode ¶
func (r GetExternalV1ServersServerIdPortalsDimensionIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetExternalV1ServersServerIdPortalsResponse ¶
type GetExternalV1ServersServerIdPortalsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]Portal JSON400 *IntendedErrorResponse }
func ParseGetExternalV1ServersServerIdPortalsResponse ¶
func ParseGetExternalV1ServersServerIdPortalsResponse(rsp *http.Response) (*GetExternalV1ServersServerIdPortalsResponse, error)
ParseGetExternalV1ServersServerIdPortalsResponse parses an HTTP response from a GetExternalV1ServersServerIdPortalsWithResponse call
func (GetExternalV1ServersServerIdPortalsResponse) Status ¶
func (r GetExternalV1ServersServerIdPortalsResponse) Status() string
Status returns HTTPResponse.Status
func (GetExternalV1ServersServerIdPortalsResponse) StatusCode ¶
func (r GetExternalV1ServersServerIdPortalsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type IntendedError ¶
type IntendedError struct { // Error Code of the functional error Error IntendedErrorError `json:"error"` }
IntendedError Error that comes when trying to validate and sanitize inputs
type IntendedErrorError ¶
type IntendedErrorError string
IntendedErrorError Code of the functional error
const ( AcceptLanguageIsBad IntendedErrorError = "accept_language.is_bad" AcceptLanguageNotFound IntendedErrorError = "accept_language.not_found" DimensionNotFound IntendedErrorError = "dimension.not_found" IdIsBad IntendedErrorError = "id.is_bad" LoginNotFound IntendedErrorError = "login.not_found" MailIsBad IntendedErrorError = "mail.is_bad" MailNotFound IntendedErrorError = "mail.not_found" NameIsBad IntendedErrorError = "name.is_bad" NameNotFound IntendedErrorError = "name.not_found" PasswordIsBad IntendedErrorError = "password.is_bad" PasswordNotFound IntendedErrorError = "password.not_found" PortalIsBad IntendedErrorError = "portal.is_bad" PortalPositionIsBad IntendedErrorError = "portal.position.is_bad" ServerNotFound IntendedErrorError = "server.not_found" TokenNotFound IntendedErrorError = "token.not_found" )
Defines values for IntendedErrorError.
type IntendedErrorResponse ¶
type IntendedErrorResponse = IntendedError
IntendedErrorResponse Error that comes when trying to validate and sanitize inputs
type Portal ¶
type Portal struct { // CreatedAt Date of the last updated position. CreatedAt *time.Time `json:"createdAt,omitempty"` // CreatedBy User that has added or updated the last position CreatedBy *User `json:"createdBy,omitempty"` // Dimension Name of the dimension Dimension string `json:"dimension"` // Position Position [x, y] in Dofus map Position *Position `json:"position,omitempty"` // RemainingUses Remaining number of uses. RemainingUses *float32 `json:"remainingUses,omitempty"` // Server Name of the server Server string `json:"server"` // UpdatedAt Date of the last updated portal. UpdatedAt *time.Time `json:"updatedAt,omitempty"` // UpdatedBy User that has added or updated the last position UpdatedBy *User `json:"updatedBy,omitempty"` }
Portal Portal position at a specific moment. If the position is not filled, then the portal position is considered as unknown and some fields will not be present.
type PortalHistory ¶
type PortalHistory struct { // IsInCanopy Is the portal position in the canopy or not. IsInCanopy *bool `json:"isInCanopy,omitempty"` // Position Position [x, y] in Dofus map Position *Position `json:"position,omitempty"` // RemainingUses Remaining number of uses. RemainingUses *float32 `json:"remainingUses,omitempty"` }
PortalHistory Portal position value at a specific period.
type Position ¶
type Position struct { // ConditionalTransport Transport used to access to a position easily ConditionalTransport *Transport `json:"conditionalTransport,omitempty"` // IsInCanopy Is the position in the canopy or not. IsInCanopy *bool `json:"isInCanopy,omitempty"` // Transport Transport used to access to a position easily Transport *Transport `json:"transport,omitempty"` // X x value in [x, y]. X float32 `json:"x"` // Y y value in [x, y]. Y float32 `json:"y"` }
Position Position [x, y] in Dofus map
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Server ¶
type Server struct { // Active Define if the server is accessible for players or not Active bool `json:"active"` // Community Community of the server. Most of the time, it is a specific region in Europe. Community ServerCommunity `json:"community"` // Id Name of the server, used as an id. Id string `json:"id"` // Type Type of the server. Most of the servers are multi-account. Type ServerType `json:"type"` }
Server Dofus game server
type ServerCommunity ¶
type ServerCommunity string
ServerCommunity Community of the server. Most of the time, it is a specific region in Europe.
const ( All ServerCommunity = "all" Es ServerCommunity = "es" Fr ServerCommunity = "fr" Pt ServerCommunity = "pt" )
Defines values for ServerCommunity.
type ServerType ¶
type ServerType string
ServerType Type of the server. Most of the servers are multi-account.
const ( Epic ServerType = "epic" Event ServerType = "event" Heroic ServerType = "heroic" Mono ServerType = "mono" Multi ServerType = "multi" )
Defines values for ServerType.
type Transport ¶
type Transport struct { // Area Area where the transport is localized. Area string `json:"area"` // SubArea Sub area where the transport is localized. SubArea string `json:"subArea"` // Type Type of the transport. Most of the transport are zaaps. Type TransportType `json:"type"` // X x value in [x, y]. X float32 `json:"x"` // Y y value in [x, y]. Y float32 `json:"y"` }
Transport Transport used to access to a position easily
type TransportType ¶
type TransportType string
TransportType Type of the transport. Most of the transport are zaaps.
const ( Brigandin TransportType = "brigandin" CharAVoile TransportType = "char_a_voile" Diligence TransportType = "diligence" Foreuse TransportType = "foreuse" Frigostien TransportType = "frigostien" Scaeroplane TransportType = "scaeroplane" Skis TransportType = "skis" Zaap TransportType = "zaap" )
Defines values for TransportType.