Documentation
¶
Overview ¶
Package apilogapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Package apilogapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Index ¶
- Constants
- func NewGetLogRequest(server string, apiLogId ApiLogId) (*http.Request, error)
- func NewGetLogsRequest(server string, params *GetLogsParams) (*http.Request, error)
- func NewReturnInternalServerErrorRequest(server string) (*http.Request, error)
- type ApiLog
- type ApiLogId
- type ApiLogs
- type Client
- func (c *Client) GetLog(ctx context.Context, apiLogId ApiLogId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetLogs(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ReturnInternalServerError(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetLogWithResponse(ctx context.Context, apiLogId ApiLogId, reqEditors ...RequestEditorFn) (*GetLogResponse, error)
- func (c *ClientWithResponses) GetLogsWithResponse(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*GetLogsResponse, error)
- func (c *ClientWithResponses) ReturnInternalServerErrorWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ReturnInternalServerErrorResponse, error)
- type ClientWithResponsesInterface
- type Error
- type GetLogResponse
- type GetLogsParams
- type GetLogsResponse
- type HttpRequestDoer
- type RequestEditorFn
- type ReturnInternalServerErrorResponse
- type Uuid
Constants ¶
const (
BearerScopes = "Bearer.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewGetLogRequest ¶
NewGetLogRequest generates requests for GetLog
func NewGetLogsRequest ¶
func NewGetLogsRequest(server string, params *GetLogsParams) (*http.Request, error)
NewGetLogsRequest generates requests for GetLogs
Types ¶
type ApiLog ¶
type ApiLog struct {
// ApiKey API Key
ApiKey string `json:"api_key"`
ApiLogId Uuid `json:"api_log_id"`
// CreatedAt Epoch second of API log registration timestamp
CreatedAt int64 `json:"created_at"`
// CreatedDate API log registration date
CreatedDate string `json:"created_date"`
// Referer The referrer of the request
Referer string `json:"referer"`
// RemoteAddress Client IP Address
RemoteAddress string `json:"remote_address"`
// RequestBody The body of the request
RequestBody string `json:"request_body"`
// RequestMethod Request method
RequestMethod string `json:"request_method"`
// RequestUri Request URI
RequestUri string `json:"request_uri"`
// ResponseBody The body of the response
ResponseBody string `json:"response_body"`
// ResponseStatus Response status
ResponseStatus string `json:"response_status"`
SaasId Uuid `json:"saas_id"`
// TraceId Trace ID
TraceId string `json:"trace_id"`
// Ttl Epoch second of planned API log deletion
Ttl int64 `json:"ttl"`
}
ApiLog defines model for ApiLog.
type ApiLogs ¶
type ApiLogs struct {
ApiLogs []ApiLog `json:"api_logs"`
// Cursor Cursor for cursor pagination
Cursor *string `json:"cursor,omitempty"`
}
ApiLogs defines model for ApiLogs.
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) GetLogs ¶
func (c *Client) GetLogs(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReturnInternalServerError ¶
type ClientInterface ¶
type ClientInterface interface {
// ReturnInternalServerError request
ReturnInternalServerError(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetLogs request
GetLogs(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetLog request
GetLog(ctx context.Context, apiLogId ApiLogId, 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) GetLogWithResponse ¶
func (c *ClientWithResponses) GetLogWithResponse(ctx context.Context, apiLogId ApiLogId, reqEditors ...RequestEditorFn) (*GetLogResponse, error)
GetLogWithResponse request returning *GetLogResponse
func (*ClientWithResponses) GetLogsWithResponse ¶
func (c *ClientWithResponses) GetLogsWithResponse(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*GetLogsResponse, error)
GetLogsWithResponse request returning *GetLogsResponse
func (*ClientWithResponses) ReturnInternalServerErrorWithResponse ¶
func (c *ClientWithResponses) ReturnInternalServerErrorWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ReturnInternalServerErrorResponse, error)
ReturnInternalServerErrorWithResponse request returning *ReturnInternalServerErrorResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ReturnInternalServerError request
ReturnInternalServerErrorWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ReturnInternalServerErrorResponse, error)
// GetLogs request
GetLogsWithResponse(ctx context.Context, params *GetLogsParams, reqEditors ...RequestEditorFn) (*GetLogsResponse, error)
// GetLog request
GetLogWithResponse(ctx context.Context, apiLogId ApiLogId, reqEditors ...RequestEditorFn) (*GetLogResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Error ¶
type Error struct {
// Message Error message
Message string `json:"message"`
// Type permission_denied
Type string `json:"type"`
}
Error defines model for Error.
type GetLogResponse ¶
type GetLogResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ApiLog
JSON500 *Error
}
func ParseGetLogResponse ¶
func ParseGetLogResponse(rsp *http.Response) (*GetLogResponse, error)
ParseGetLogResponse parses an HTTP response from a GetLogWithResponse call
func (GetLogResponse) Status ¶
func (r GetLogResponse) Status() string
Status returns HTTPResponse.Status
func (GetLogResponse) StatusCode ¶
func (r GetLogResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetLogsParams ¶ added in v1.10.19
type GetLogsParams struct {
// CreatedDate The date, in format of YYYY-MM-DD, to retrieve the log.
CreatedDate *openapi_types.Date `form:"created_date,omitempty" json:"created_date,omitempty"`
// CreatedAt The datetime, in ISO 8601 format, to retrieve the log.
CreatedAt *time.Time `form:"created_at,omitempty" json:"created_at,omitempty"`
// Limit Maximum number of logs to retrieve.
Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"`
// Cursor Cursor for cursor pagination.
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
}
GetLogsParams defines parameters for GetLogs.
type GetLogsResponse ¶
type GetLogsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ApiLogs
JSON500 *Error
}
func ParseGetLogsResponse ¶
func ParseGetLogsResponse(rsp *http.Response) (*GetLogsResponse, error)
ParseGetLogsResponse parses an HTTP response from a GetLogsWithResponse call
func (GetLogsResponse) Status ¶
func (r GetLogsResponse) Status() string
Status returns HTTPResponse.Status
func (GetLogsResponse) StatusCode ¶
func (r GetLogsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ReturnInternalServerErrorResponse ¶
type ReturnInternalServerErrorResponse struct {
Body []byte
HTTPResponse *http.Response
JSON500 *Error
}
func ParseReturnInternalServerErrorResponse ¶
func ParseReturnInternalServerErrorResponse(rsp *http.Response) (*ReturnInternalServerErrorResponse, error)
ParseReturnInternalServerErrorResponse parses an HTTP response from a ReturnInternalServerErrorWithResponse call
func (ReturnInternalServerErrorResponse) Status ¶
func (r ReturnInternalServerErrorResponse) Status() string
Status returns HTTPResponse.Status
func (ReturnInternalServerErrorResponse) StatusCode ¶
func (r ReturnInternalServerErrorResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode