Documentation ¶
Index ¶
- Constants
- Variables
- type GraphQLQuery
- type GraphQLQueryEndpoint
- type GraphQLQuerySpec
- type GraphQLSpec
- type GraphQlApiType
- type HTTPCodesResponse
- type HTTPMethod
- type HTTPMethodsResponses
- type HTTPResponse
- type ID
- type NexusGenericObject
- type Node
- type ResponseCode
- type RestAPISpec
- type RestURIs
- type SecretSpec
- type SingletonNode
Constants ¶
const (
BaseGroupName string = "tanzu.tsm.vmware.com"
)
Variables ¶
var DefaultHTTPDELETEResponses = HTTPCodesResponse{ http.StatusOK: HTTPResponse{Description: http.StatusText(http.StatusOK)}, http.StatusNotFound: HTTPResponse{Description: http.StatusText(http.StatusNotFound)}, DefaultHTTPErrorCode: DefaultHTTPError, }
Default HTTP DELETE Response mappings.
var DefaultHTTPError = HTTPResponse{Description: http.StatusText(http.StatusNotImplemented)}
var DefaultHTTPGETResponses = HTTPCodesResponse{ http.StatusOK: HTTPResponse{Description: http.StatusText(http.StatusOK)}, http.StatusNotFound: HTTPResponse{Description: http.StatusText(http.StatusNotFound)}, DefaultHTTPErrorCode: DefaultHTTPError, }
Default HTTP GET Response mappings.
var DefaultHTTPMethodsResponses = HTTPMethodsResponses{ http.MethodGet: DefaultHTTPGETResponses, http.MethodPut: DefaultHTTPPUTResponses, http.MethodDelete: DefaultHTTPDELETEResponses, }
Default HTTP methods and responses.
var DefaultHTTPPUTResponses = HTTPCodesResponse{ http.StatusOK: HTTPResponse{Description: http.StatusText(http.StatusOK)}, http.StatusCreated: HTTPResponse{Description: http.StatusText(http.StatusCreated)}, DefaultHTTPErrorCode: DefaultHTTPError, }
Default HTTP PUT Response mappings.
var HTTPListResponse = HTTPMethodsResponses{ "LIST": DefaultHTTPGETResponses, }
HTTP Response for List operation
Functions ¶
This section is empty.
Types ¶
type GraphQLQuery ¶
type GraphQLQuery struct { Name string `json:"name,omitempty"` // query identifier ServiceEndpoint GraphQLQueryEndpoint `json:"service_endpoint,omitempty"` // endpoint that serves this query Args interface{} `json:"args,omitempty"` // custom graphql filters and arguments ApiType GraphQlApiType `json:"api_type,omitempty"` // type of GRPC API endpoint }
A GraphQLQuery specifies a custom query available via GraphQL API. Each GraphQLQuery is self contained unit of the exposed custom query.
type GraphQLQueryEndpoint ¶
type GraphQLQueryEndpoint struct { Domain string `json:"domain"` // fully qualified domain name of the network endpoint Port int `json:"port"` // service port }
A GraphQLQueryEndpoint specifies the network endpoint that serves a GraphQL query.
type GraphQLQuerySpec ¶
type GraphQLQuerySpec struct {
Queries []GraphQLQuery `json:"queries"`
}
A GraphQLQuerySpec is a collection of GraphQLQuery. GraphQLQuerySpec provides a handle to represent and refer a collection of GraphQLQuery.
type GraphQlApiType ¶
type GraphQlApiType int
const ( GraphQLQueryApi GraphQlApiType = iota GetMetricsApi )
type HTTPCodesResponse ¶
type HTTPCodesResponse map[ResponseCode]HTTPResponse
HTTPCodesResponse code to response type.
type HTTPMethodsResponses ¶
type HTTPMethodsResponses map[HTTPMethod]HTTPCodesResponse
HTTPMethodsResponses to response mapping.
type HTTPResponse ¶
type HTTPResponse struct {
Description string `json:"description"`
}
HTTPResponse type.
type ResponseCode ¶
type ResponseCode int
ResponseCode type.
const DefaultHTTPErrorCode ResponseCode = http.StatusNotImplemented
Default HTTP error code and description.
type RestAPISpec ¶
type RestAPISpec struct {
Uris []RestURIs `json:"uris"`
}
type RestURIs ¶
type RestURIs struct { Uri string `json:"uri"` QueryParams []string `json:"query_params,omitempty"` Methods HTTPMethodsResponses `json:"methods"` }
RestURIs and associated data.
type SecretSpec ¶
type SecretSpec struct{}
type SingletonNode ¶
type SingletonNode struct {
ID
}