Documentation
¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeConflict(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeGatewayError(err error) *goa.ServiceError
- func MakeInvalid(err error) *goa.ServiceError
- func MakeInvariantViolation(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func MakeUnexpected(err error) *goa.ServiceError
- func MakeUnsupportedMedia(err error) *goa.ServiceError
- func NewListLogsEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
- type Auther
- type Client
- type Endpoints
- type HTTPToolLog
- type ListLogsPayload
- type ListToolLogResponse
- type PaginationResponse
- type Service
- type ToolType
Constants ¶
const APIName = "gram"
APIName is the name of the API as defined in the design.
const APIVersion = "0.0.1"
APIVersion is the version of the API as defined in the design.
const ServiceName = "logs"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [1]string{"listLogs"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeBadRequest ¶
func MakeBadRequest(err error) *goa.ServiceError
MakeBadRequest builds a goa.ServiceError from an error.
func MakeConflict ¶
func MakeConflict(err error) *goa.ServiceError
MakeConflict builds a goa.ServiceError from an error.
func MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeGatewayError ¶
func MakeGatewayError(err error) *goa.ServiceError
MakeGatewayError builds a goa.ServiceError from an error.
func MakeInvalid ¶
func MakeInvalid(err error) *goa.ServiceError
MakeInvalid builds a goa.ServiceError from an error.
func MakeInvariantViolation ¶
func MakeInvariantViolation(err error) *goa.ServiceError
MakeInvariantViolation builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func MakeUnexpected ¶
func MakeUnexpected(err error) *goa.ServiceError
MakeUnexpected builds a goa.ServiceError from an error.
func MakeUnsupportedMedia ¶
func MakeUnsupportedMedia(err error) *goa.ServiceError
MakeUnsupportedMedia builds a goa.ServiceError from an error.
func NewListLogsEndpoint ¶
func NewListLogsEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint
NewListLogsEndpoint returns an endpoint function that calls the method "listLogs" of service "logs".
Types ¶
type Auther ¶
type Auther interface {
// APIKeyAuth implements the authorization logic for the APIKey security scheme.
APIKeyAuth(ctx context.Context, key string, schema *security.APIKeyScheme) (context.Context, error)
}
Auther defines the authorization functions to be implemented by the service.
type Client ¶
Client is the "logs" service client.
func (*Client) ListLogs ¶
func (c *Client) ListLogs(ctx context.Context, p *ListLogsPayload) (res *ListToolLogResponse, err error)
ListLogs calls the "listLogs" endpoint of the "logs" service. ListLogs may return the following errors:
- "unauthorized" (type *goa.ServiceError): unauthorized access
- "forbidden" (type *goa.ServiceError): permission denied
- "bad_request" (type *goa.ServiceError): request is invalid
- "not_found" (type *goa.ServiceError): resource not found
- "conflict" (type *goa.ServiceError): resource already exists
- "unsupported_media" (type *goa.ServiceError): unsupported media type
- "invalid" (type *goa.ServiceError): request contains one or more invalidation fields
- "invariant_violation" (type *goa.ServiceError): an unexpected error occurred
- "unexpected" (type *goa.ServiceError): an unexpected error occurred
- "gateway_error" (type *goa.ServiceError): an unexpected error occurred
- error: internal error
type Endpoints ¶
Endpoints wraps the "logs" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "logs" service with endpoints.
type HTTPToolLog ¶
type HTTPToolLog struct {
// Id of the request
ID *string
// Timestamp of the request
Ts string
// Organization UUID
OrganizationID string
// Project UUID
ProjectID *string
// Deployment UUID
DeploymentID string
// Tool UUID
ToolID string
// Tool URN
ToolUrn string
// Tool type
ToolType ToolType
// Trace ID for correlation
TraceID string
// Span ID for correlation
SpanID string
// HTTP method
HTTPMethod string
// HTTP route
HTTPRoute string
// HTTP status code
StatusCode int64
// Duration in milliseconds
DurationMs float64
// User agent
UserAgent string
// Request headers
RequestHeaders map[string]string
// Request body size in bytes
RequestBodyBytes *int64
// Response headers
ResponseHeaders map[string]string
// Response body size in bytes
ResponseBodyBytes *int64
}
HTTP tool request and response log entry
type ListLogsPayload ¶
type ListLogsPayload struct {
ApikeyToken *string
SessionToken *string
ProjectSlugInput *string
// Tool ID
ToolID *string
// Start timestamp
TsStart *string
// End timestamp
TsEnd *string
// Cursor for pagination
Cursor *string
// Number of items per page (1-100)
PerPage int
// Pagination direction
Direction string
// Sort order
Sort string
}
ListLogsPayload is the payload type of the logs service listLogs method.
type ListToolLogResponse ¶
type ListToolLogResponse struct {
Logs []*HTTPToolLog
Pagination *PaginationResponse
}
ListToolLogResponse is the result type of the logs service listLogs method.
type PaginationResponse ¶
type PaginationResponse struct {
// Number of items per page
PerPage *int
// Whether there is a next page
HasNextPage *bool
// Cursor for next page
NextPageCursor *string
}
Pagination metadata for list responses
type Service ¶
type Service interface {
// List call logs for a toolset.
ListLogs(context.Context, *ListLogsPayload) (res *ListToolLogResponse, err error)
}
Call logs for a toolset.