Documentation
¶
Overview ¶
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- func NewGETRequest(server string) (*http.Request, error)
- func NewGETapiroomsRequest(server string, params *GETapiroomsParams) (*http.Request, error)
- func NewGETapiroomsRoommessagesRequest(server string, room string, params *GETapiroomsRoommessagesParams) (*http.Request, error)
- func NewGETapiroomssearchRequest(server string, params *GETapiroomssearchParams) (*http.Request, error)
- func NewGETapiserverInfoRequest(server string, params *GETapiserverInfoParams) (*http.Request, error)
- func NewGETapiusersPublicKeyRequest(server string, publicKey string, params *GETapiusersPublicKeyParams) (*http.Request, error)
- func NewPOSTapiroomsRequest(server string, params *POSTapiroomsParams, body POSTapiroomsJSONRequestBody) (*http.Request, error)
- func NewPOSTapiroomsRequestWithBody(server string, params *POSTapiroomsParams, contentType string, body io.Reader) (*http.Request, error)
- func NewPOSTapiroomsRoommessagesRequest(server string, room string, params *POSTapiroomsRoommessagesParams, ...) (*http.Request, error)
- func NewPOSTapiroomsRoommessagesRequestWithBody(server string, room string, params *POSTapiroomsRoommessagesParams, ...) (*http.Request, error)
- type Client
- func (c *Client) GET(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GETapirooms(ctx context.Context, params *GETapiroomsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GETapiroomsRoommessages(ctx context.Context, room string, params *GETapiroomsRoommessagesParams, ...) (*http.Response, error)
- func (c *Client) GETapiroomssearch(ctx context.Context, params *GETapiroomssearchParams, ...) (*http.Response, error)
- func (c *Client) GETapiserverInfo(ctx context.Context, params *GETapiserverInfoParams, ...) (*http.Response, error)
- func (c *Client) GETapiusersPublicKey(ctx context.Context, publicKey string, params *GETapiusersPublicKeyParams, ...) (*http.Response, error)
- func (c *Client) POSTapirooms(ctx context.Context, params *POSTapiroomsParams, ...) (*http.Response, error)
- func (c *Client) POSTapiroomsRoommessages(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, ...) (*http.Response, error)
- func (c *Client) POSTapiroomsRoommessagesWithBody(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, ...) (*http.Response, error)
- func (c *Client) POSTapiroomsWithBody(ctx context.Context, params *POSTapiroomsParams, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GETWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GETResponse, error)
- func (c *ClientWithResponses) GETapiroomsRoommessagesWithResponse(ctx context.Context, room string, params *GETapiroomsRoommessagesParams, ...) (*GETapiroomsRoommessagesResponse, error)
- func (c *ClientWithResponses) GETapiroomsWithResponse(ctx context.Context, params *GETapiroomsParams, reqEditors ...RequestEditorFn) (*GETapiroomsResponse, error)
- func (c *ClientWithResponses) GETapiroomssearchWithResponse(ctx context.Context, params *GETapiroomssearchParams, ...) (*GETapiroomssearchResponse, error)
- func (c *ClientWithResponses) GETapiserverInfoWithResponse(ctx context.Context, params *GETapiserverInfoParams, ...) (*GETapiserverInfoResponse, error)
- func (c *ClientWithResponses) GETapiusersPublicKeyWithResponse(ctx context.Context, publicKey string, params *GETapiusersPublicKeyParams, ...) (*GETapiusersPublicKeyResponse, error)
- func (c *ClientWithResponses) POSTapiroomsRoommessagesWithBodyWithResponse(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, ...) (*POSTapiroomsRoommessagesResponse, error)
- func (c *ClientWithResponses) POSTapiroomsRoommessagesWithResponse(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, ...) (*POSTapiroomsRoommessagesResponse, error)
- func (c *ClientWithResponses) POSTapiroomsWithBodyWithResponse(ctx context.Context, params *POSTapiroomsParams, contentType string, ...) (*POSTapiroomsResponse, error)
- func (c *ClientWithResponses) POSTapiroomsWithResponse(ctx context.Context, params *POSTapiroomsParams, ...) (*POSTapiroomsResponse, error)
- type ClientWithResponsesInterface
- type CreateRoomRequest
- type GETResponse
- type GETapiroomsParams
- type GETapiroomsResponse
- type GETapiroomsRoommessagesParams
- type GETapiroomsRoommessagesResponse
- type GETapiroomssearchParams
- type GETapiroomssearchResponse
- type GETapiserverInfoParams
- type GETapiserverInfoResponse
- type GETapiusersPublicKeyParams
- type GETapiusersPublicKeyResponse
- type HTTPError
- type HttpRequestDoer
- type Message
- type POSTapiroomsJSONRequestBody
- type POSTapiroomsParams
- type POSTapiroomsResponse
- type POSTapiroomsRoommessagesJSONRequestBody
- type POSTapiroomsRoommessagesParams
- type POSTapiroomsRoommessagesResponse
- type RequestEditorFn
- type Room
- type SendMessageRequest
- type ServerInfoResponse
- type UnknownInterface
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGETRequest ¶
NewGETRequest generates requests for GET
func NewGETapiroomsRequest ¶
func NewGETapiroomsRequest(server string, params *GETapiroomsParams) (*http.Request, error)
NewGETapiroomsRequest generates requests for GETapirooms
func NewGETapiroomsRoommessagesRequest ¶
func NewGETapiroomsRoommessagesRequest(server string, room string, params *GETapiroomsRoommessagesParams) (*http.Request, error)
NewGETapiroomsRoommessagesRequest generates requests for GETapiroomsRoommessages
func NewGETapiroomssearchRequest ¶
func NewGETapiroomssearchRequest(server string, params *GETapiroomssearchParams) (*http.Request, error)
NewGETapiroomssearchRequest generates requests for GETapiroomssearch
func NewGETapiserverInfoRequest ¶
func NewGETapiserverInfoRequest(server string, params *GETapiserverInfoParams) (*http.Request, error)
NewGETapiserverInfoRequest generates requests for GETapiserverInfo
func NewGETapiusersPublicKeyRequest ¶
func NewGETapiusersPublicKeyRequest(server string, publicKey string, params *GETapiusersPublicKeyParams) (*http.Request, error)
NewGETapiusersPublicKeyRequest generates requests for GETapiusersPublicKey
func NewPOSTapiroomsRequest ¶
func NewPOSTapiroomsRequest(server string, params *POSTapiroomsParams, body POSTapiroomsJSONRequestBody) (*http.Request, error)
NewPOSTapiroomsRequest calls the generic POSTapirooms builder with application/json body
func NewPOSTapiroomsRequestWithBody ¶
func NewPOSTapiroomsRequestWithBody(server string, params *POSTapiroomsParams, contentType string, body io.Reader) (*http.Request, error)
NewPOSTapiroomsRequestWithBody generates requests for POSTapirooms with any type of body
func NewPOSTapiroomsRoommessagesRequest ¶
func NewPOSTapiroomsRoommessagesRequest(server string, room string, params *POSTapiroomsRoommessagesParams, body POSTapiroomsRoommessagesJSONRequestBody) (*http.Request, error)
NewPOSTapiroomsRoommessagesRequest calls the generic POSTapiroomsRoommessages builder with application/json body
func NewPOSTapiroomsRoommessagesRequestWithBody ¶
func NewPOSTapiroomsRoommessagesRequestWithBody(server string, room string, params *POSTapiroomsRoommessagesParams, contentType string, body io.Reader) (*http.Request, error)
NewPOSTapiroomsRoommessagesRequestWithBody generates requests for POSTapiroomsRoommessages with any type of body
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) GETapirooms ¶
func (c *Client) GETapirooms(ctx context.Context, params *GETapiroomsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GETapiroomsRoommessages ¶
func (c *Client) GETapiroomsRoommessages(ctx context.Context, room string, params *GETapiroomsRoommessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GETapiroomssearch ¶
func (c *Client) GETapiroomssearch(ctx context.Context, params *GETapiroomssearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GETapiserverInfo ¶
func (c *Client) GETapiserverInfo(ctx context.Context, params *GETapiserverInfoParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GETapiusersPublicKey ¶
func (c *Client) GETapiusersPublicKey(ctx context.Context, publicKey string, params *GETapiusersPublicKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) POSTapirooms ¶
func (c *Client) POSTapirooms(ctx context.Context, params *POSTapiroomsParams, body POSTapiroomsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) POSTapiroomsRoommessages ¶
func (c *Client) POSTapiroomsRoommessages(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, body POSTapiroomsRoommessagesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) POSTapiroomsRoommessagesWithBody ¶
func (*Client) POSTapiroomsWithBody ¶
type ClientInterface ¶
type ClientInterface interface {
// GET request
GET(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GETapirooms request
GETapirooms(ctx context.Context, params *GETapiroomsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// POSTapiroomsWithBody request with any body
POSTapiroomsWithBody(ctx context.Context, params *POSTapiroomsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
POSTapirooms(ctx context.Context, params *POSTapiroomsParams, body POSTapiroomsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GETapiroomssearch request
GETapiroomssearch(ctx context.Context, params *GETapiroomssearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GETapiroomsRoommessages request
GETapiroomsRoommessages(ctx context.Context, room string, params *GETapiroomsRoommessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// POSTapiroomsRoommessagesWithBody request with any body
POSTapiroomsRoommessagesWithBody(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
POSTapiroomsRoommessages(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, body POSTapiroomsRoommessagesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GETapiserverInfo request
GETapiserverInfo(ctx context.Context, params *GETapiserverInfoParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GETapiusersPublicKey request
GETapiusersPublicKey(ctx context.Context, publicKey string, params *GETapiusersPublicKeyParams, 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) GETWithResponse ¶
func (c *ClientWithResponses) GETWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GETResponse, error)
GETWithResponse request returning *GETResponse
func (*ClientWithResponses) GETapiroomsRoommessagesWithResponse ¶
func (c *ClientWithResponses) GETapiroomsRoommessagesWithResponse(ctx context.Context, room string, params *GETapiroomsRoommessagesParams, reqEditors ...RequestEditorFn) (*GETapiroomsRoommessagesResponse, error)
GETapiroomsRoommessagesWithResponse request returning *GETapiroomsRoommessagesResponse
func (*ClientWithResponses) GETapiroomsWithResponse ¶
func (c *ClientWithResponses) GETapiroomsWithResponse(ctx context.Context, params *GETapiroomsParams, reqEditors ...RequestEditorFn) (*GETapiroomsResponse, error)
GETapiroomsWithResponse request returning *GETapiroomsResponse
func (*ClientWithResponses) GETapiroomssearchWithResponse ¶
func (c *ClientWithResponses) GETapiroomssearchWithResponse(ctx context.Context, params *GETapiroomssearchParams, reqEditors ...RequestEditorFn) (*GETapiroomssearchResponse, error)
GETapiroomssearchWithResponse request returning *GETapiroomssearchResponse
func (*ClientWithResponses) GETapiserverInfoWithResponse ¶
func (c *ClientWithResponses) GETapiserverInfoWithResponse(ctx context.Context, params *GETapiserverInfoParams, reqEditors ...RequestEditorFn) (*GETapiserverInfoResponse, error)
GETapiserverInfoWithResponse request returning *GETapiserverInfoResponse
func (*ClientWithResponses) GETapiusersPublicKeyWithResponse ¶
func (c *ClientWithResponses) GETapiusersPublicKeyWithResponse(ctx context.Context, publicKey string, params *GETapiusersPublicKeyParams, reqEditors ...RequestEditorFn) (*GETapiusersPublicKeyResponse, error)
GETapiusersPublicKeyWithResponse request returning *GETapiusersPublicKeyResponse
func (*ClientWithResponses) POSTapiroomsRoommessagesWithBodyWithResponse ¶
func (c *ClientWithResponses) POSTapiroomsRoommessagesWithBodyWithResponse(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*POSTapiroomsRoommessagesResponse, error)
POSTapiroomsRoommessagesWithBodyWithResponse request with arbitrary body returning *POSTapiroomsRoommessagesResponse
func (*ClientWithResponses) POSTapiroomsRoommessagesWithResponse ¶
func (c *ClientWithResponses) POSTapiroomsRoommessagesWithResponse(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, body POSTapiroomsRoommessagesJSONRequestBody, reqEditors ...RequestEditorFn) (*POSTapiroomsRoommessagesResponse, error)
func (*ClientWithResponses) POSTapiroomsWithBodyWithResponse ¶
func (c *ClientWithResponses) POSTapiroomsWithBodyWithResponse(ctx context.Context, params *POSTapiroomsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*POSTapiroomsResponse, error)
POSTapiroomsWithBodyWithResponse request with arbitrary body returning *POSTapiroomsResponse
func (*ClientWithResponses) POSTapiroomsWithResponse ¶
func (c *ClientWithResponses) POSTapiroomsWithResponse(ctx context.Context, params *POSTapiroomsParams, body POSTapiroomsJSONRequestBody, reqEditors ...RequestEditorFn) (*POSTapiroomsResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GETWithResponse request
GETWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GETResponse, error)
// GETapiroomsWithResponse request
GETapiroomsWithResponse(ctx context.Context, params *GETapiroomsParams, reqEditors ...RequestEditorFn) (*GETapiroomsResponse, error)
// POSTapiroomsWithBodyWithResponse request with any body
POSTapiroomsWithBodyWithResponse(ctx context.Context, params *POSTapiroomsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*POSTapiroomsResponse, error)
POSTapiroomsWithResponse(ctx context.Context, params *POSTapiroomsParams, body POSTapiroomsJSONRequestBody, reqEditors ...RequestEditorFn) (*POSTapiroomsResponse, error)
// GETapiroomssearchWithResponse request
GETapiroomssearchWithResponse(ctx context.Context, params *GETapiroomssearchParams, reqEditors ...RequestEditorFn) (*GETapiroomssearchResponse, error)
// GETapiroomsRoommessagesWithResponse request
GETapiroomsRoommessagesWithResponse(ctx context.Context, room string, params *GETapiroomsRoommessagesParams, reqEditors ...RequestEditorFn) (*GETapiroomsRoommessagesResponse, error)
// POSTapiroomsRoommessagesWithBodyWithResponse request with any body
POSTapiroomsRoommessagesWithBodyWithResponse(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*POSTapiroomsRoommessagesResponse, error)
POSTapiroomsRoommessagesWithResponse(ctx context.Context, room string, params *POSTapiroomsRoommessagesParams, body POSTapiroomsRoommessagesJSONRequestBody, reqEditors ...RequestEditorFn) (*POSTapiroomsRoommessagesResponse, error)
// GETapiserverInfoWithResponse request
GETapiserverInfoWithResponse(ctx context.Context, params *GETapiserverInfoParams, reqEditors ...RequestEditorFn) (*GETapiserverInfoResponse, error)
// GETapiusersPublicKeyWithResponse request
GETapiusersPublicKeyWithResponse(ctx context.Context, publicKey string, params *GETapiusersPublicKeyParams, reqEditors ...RequestEditorFn) (*GETapiusersPublicKeyResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateRoomRequest ¶
type CreateRoomRequest struct {
Name string `json:"name"`
Password *string `json:"password,omitempty"`
}
CreateRoomRequest CreateRoomRequest schema
type GETResponse ¶
type GETResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *UnknownInterface
XML200 *UnknownInterface
JSON400 *HTTPError
XML400 *HTTPError
JSON500 *HTTPError
XML500 *HTTPError
}
func ParseGETResponse ¶
func ParseGETResponse(rsp *http.Response) (*GETResponse, error)
ParseGETResponse parses an HTTP response from a GETWithResponse call
func (GETResponse) StatusCode ¶
func (r GETResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GETapiroomsParams ¶
type GETapiroomsParams struct {
Visited *string `form:"visited,omitempty" json:"visited,omitempty"`
Accept *string `json:"Accept,omitempty"`
}
GETapiroomsParams defines parameters for GETapirooms.
type GETapiroomsResponse ¶
type GETapiroomsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]Room
XML200 *[]Room
JSON400 *HTTPError
XML400 *HTTPError
JSON500 *HTTPError
XML500 *HTTPError
}
func ParseGETapiroomsResponse ¶
func ParseGETapiroomsResponse(rsp *http.Response) (*GETapiroomsResponse, error)
ParseGETapiroomsResponse parses an HTTP response from a GETapiroomsWithResponse call
func (GETapiroomsResponse) Status ¶
func (r GETapiroomsResponse) Status() string
Status returns HTTPResponse.Status
func (GETapiroomsResponse) StatusCode ¶
func (r GETapiroomsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GETapiroomsRoommessagesParams ¶
type GETapiroomsRoommessagesParams struct {
Password *string `form:"password,omitempty" json:"password,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
Before *string `form:"before,omitempty" json:"before,omitempty"`
Accept *string `json:"Accept,omitempty"`
}
GETapiroomsRoommessagesParams defines parameters for GETapiroomsRoommessages.
type GETapiroomsRoommessagesResponse ¶
type GETapiroomsRoommessagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]Message
XML200 *[]Message
JSON400 *HTTPError
XML400 *HTTPError
JSON500 *HTTPError
XML500 *HTTPError
}
func ParseGETapiroomsRoommessagesResponse ¶
func ParseGETapiroomsRoommessagesResponse(rsp *http.Response) (*GETapiroomsRoommessagesResponse, error)
ParseGETapiroomsRoommessagesResponse parses an HTTP response from a GETapiroomsRoommessagesWithResponse call
func (GETapiroomsRoommessagesResponse) Status ¶
func (r GETapiroomsRoommessagesResponse) Status() string
Status returns HTTPResponse.Status
func (GETapiroomsRoommessagesResponse) StatusCode ¶
func (r GETapiroomsRoommessagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GETapiroomssearchParams ¶
type GETapiroomssearchParams struct {
Visited *string `form:"visited,omitempty" json:"visited,omitempty"`
Q *string `form:"q,omitempty" json:"q,omitempty"`
Accept *string `json:"Accept,omitempty"`
}
GETapiroomssearchParams defines parameters for GETapiroomssearch.
type GETapiroomssearchResponse ¶
type GETapiroomssearchResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]Room
XML200 *[]Room
JSON400 *HTTPError
XML400 *HTTPError
JSON500 *HTTPError
XML500 *HTTPError
}
func ParseGETapiroomssearchResponse ¶
func ParseGETapiroomssearchResponse(rsp *http.Response) (*GETapiroomssearchResponse, error)
ParseGETapiroomssearchResponse parses an HTTP response from a GETapiroomssearchWithResponse call
func (GETapiroomssearchResponse) Status ¶
func (r GETapiroomssearchResponse) Status() string
Status returns HTTPResponse.Status
func (GETapiroomssearchResponse) StatusCode ¶
func (r GETapiroomssearchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GETapiserverInfoParams ¶
type GETapiserverInfoParams struct {
Accept *string `json:"Accept,omitempty"`
}
GETapiserverInfoParams defines parameters for GETapiserverInfo.
type GETapiserverInfoResponse ¶
type GETapiserverInfoResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ServerInfoResponse
XML200 *ServerInfoResponse
JSON400 *HTTPError
XML400 *HTTPError
JSON500 *HTTPError
XML500 *HTTPError
}
func ParseGETapiserverInfoResponse ¶
func ParseGETapiserverInfoResponse(rsp *http.Response) (*GETapiserverInfoResponse, error)
ParseGETapiserverInfoResponse parses an HTTP response from a GETapiserverInfoWithResponse call
func (GETapiserverInfoResponse) Status ¶
func (r GETapiserverInfoResponse) Status() string
Status returns HTTPResponse.Status
func (GETapiserverInfoResponse) StatusCode ¶
func (r GETapiserverInfoResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GETapiusersPublicKeyParams ¶
type GETapiusersPublicKeyParams struct {
Accept *string `json:"Accept,omitempty"`
}
GETapiusersPublicKeyParams defines parameters for GETapiusersPublicKey.
type GETapiusersPublicKeyResponse ¶
type GETapiusersPublicKeyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *User
XML200 *User
JSON400 *HTTPError
XML400 *HTTPError
JSON500 *HTTPError
XML500 *HTTPError
}
func ParseGETapiusersPublicKeyResponse ¶
func ParseGETapiusersPublicKeyResponse(rsp *http.Response) (*GETapiusersPublicKeyResponse, error)
ParseGETapiusersPublicKeyResponse parses an HTTP response from a GETapiusersPublicKeyWithResponse call
func (GETapiusersPublicKeyResponse) Status ¶
func (r GETapiusersPublicKeyResponse) Status() string
Status returns HTTPResponse.Status
func (GETapiusersPublicKeyResponse) StatusCode ¶
func (r GETapiusersPublicKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HTTPError ¶
type HTTPError struct {
// Detail Human readable error message
Detail *string `json:"detail,omitempty"`
Errors *[]*struct {
// More Additional information about the error
More *map[string]*interface{} `json:"more,omitempty"`
// Name For example, name of the parameter that caused the error
Name *string `json:"name,omitempty"`
// Reason Human readable error message
Reason *string `json:"reason,omitempty"`
} `json:"errors,omitempty"`
Instance *string `json:"instance,omitempty"`
// Status HTTP status code
Status *int `json:"status,omitempty"`
// Title Short title of the error
Title *string `json:"title,omitempty"`
// Type URL of the error type. Can be used to lookup the error in a documentation
Type *string `json:"type,omitempty"`
}
HTTPError HTTPError schema
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Message ¶
type Message struct {
Content *string `json:"content,omitempty"`
Id *string `json:"id,omitempty"`
Pubkey *string `json:"pubkey,omitempty"`
Room *string `json:"room,omitempty"`
Signature *string `json:"signature,omitempty"`
SignedTimestamp *int64 `json:"signed_timestamp,omitempty"`
Timestamp *time.Time `json:"timestamp,omitempty"`
User *string `json:"user,omitempty"`
}
Message Message schema
type POSTapiroomsJSONRequestBody ¶
type POSTapiroomsJSONRequestBody = CreateRoomRequest
POSTapiroomsJSONRequestBody defines body for POSTapirooms for application/json ContentType.
type POSTapiroomsParams ¶
type POSTapiroomsParams struct {
Accept *string `json:"Accept,omitempty"`
}
POSTapiroomsParams defines parameters for POSTapirooms.
type POSTapiroomsResponse ¶
type POSTapiroomsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Room
XML200 *Room
JSON400 *HTTPError
XML400 *HTTPError
JSON500 *HTTPError
XML500 *HTTPError
}
func ParsePOSTapiroomsResponse ¶
func ParsePOSTapiroomsResponse(rsp *http.Response) (*POSTapiroomsResponse, error)
ParsePOSTapiroomsResponse parses an HTTP response from a POSTapiroomsWithResponse call
func (POSTapiroomsResponse) Status ¶
func (r POSTapiroomsResponse) Status() string
Status returns HTTPResponse.Status
func (POSTapiroomsResponse) StatusCode ¶
func (r POSTapiroomsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type POSTapiroomsRoommessagesJSONRequestBody ¶
type POSTapiroomsRoommessagesJSONRequestBody = SendMessageRequest
POSTapiroomsRoommessagesJSONRequestBody defines body for POSTapiroomsRoommessages for application/json ContentType.
type POSTapiroomsRoommessagesParams ¶
type POSTapiroomsRoommessagesParams struct {
Accept *string `json:"Accept,omitempty"`
}
POSTapiroomsRoommessagesParams defines parameters for POSTapiroomsRoommessages.
type POSTapiroomsRoommessagesResponse ¶
type POSTapiroomsRoommessagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Message
XML200 *Message
JSON400 *HTTPError
XML400 *HTTPError
JSON500 *HTTPError
XML500 *HTTPError
}
func ParsePOSTapiroomsRoommessagesResponse ¶
func ParsePOSTapiroomsRoommessagesResponse(rsp *http.Response) (*POSTapiroomsRoommessagesResponse, error)
ParsePOSTapiroomsRoommessagesResponse parses an HTTP response from a POSTapiroomsRoommessagesWithResponse call
func (POSTapiroomsRoommessagesResponse) Status ¶
func (r POSTapiroomsRoommessagesResponse) Status() string
Status returns HTTPResponse.Status
func (POSTapiroomsRoommessagesResponse) StatusCode ¶
func (r POSTapiroomsRoommessagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Room ¶
type Room struct {
HasPassword *bool `json:"has_password,omitempty"`
LastMessageContent *string `json:"last_message_content,omitempty"`
LastMessageTimestamp *string `json:"last_message_timestamp,omitempty"`
LastMessageUser *string `json:"last_message_user,omitempty"`
Name *string `json:"name,omitempty"`
}
Room Room schema
type SendMessageRequest ¶
type SendMessageRequest struct {
Content string `json:"content"`
Pubkey string `json:"pubkey"`
RoomPassword *string `json:"room_password,omitempty"`
Signature string `json:"signature"`
Timestamp int64 `json:"timestamp"`
User string `json:"user"`
}
SendMessageRequest SendMessageRequest schema
type ServerInfoResponse ¶
type ServerInfoResponse struct {
Description *string `json:"description,omitempty"`
SuggestedQuickname *string `json:"suggested_quickname,omitempty"`
SuggestedServers []string `json:"suggested_servers,omitempty"`
}
ServerInfoResponse ServerInfoResponse schema
type UnknownInterface ¶
type UnknownInterface = interface{}
UnknownInterface unknown-interface schema