Documentation
¶
Index ¶
- func Deserialize[T RestEndpoint | SmartInstance](data []byte, obj *T) error
- func Serialize[T RestEndpoint | SmartInstance](obj T) ([]byte, error)
- type ApiKeyAuthCredentialsInstance
- type BasicAuthCredentialsInstance
- type DefaultResponse
- type EndpointResponse
- type ErrorResponse
- type HealthResponse
- type OpenApiSwaggerSource
- type ProtectedResourceResponse
- type ProteusHints
- type ProteusHintsApiKeyAuth
- type RestEndpoint
- type RestEndpointCookie
- type RestEndpointHeader
- type RestEndpointResponseBody
- type RestEndpointResponseStructure
- type SmartCreatedResponse
- type SmartInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func Deserialize[T RestEndpoint | SmartInstance](data []byte, obj *T) error
func Serialize ¶
func Serialize[T RestEndpoint | SmartInstance](obj T) ([]byte, error)
Types ¶
type DefaultResponse ¶
type DefaultResponse struct {
Message string `json:"message,omitempty" xml:"message,omitempty"`
}
type EndpointResponse ¶
type EndpointResponse struct {
Path string `json:"path,omitempty" xml:"path,omitempty"`
Method string `json:"method,omitempty" xml:"method,omitempty"`
Description string `json:"description,omitempty" xml:"description,omitempty"`
Responses map[string]RestEndpointResponseStructure `json:"responses,omitempty" xml:"responses,omitempty"`
}
type ErrorResponse ¶
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status" xml:"status"`
}
type OpenApiSwaggerSource ¶
type OpenApiSwaggerSource struct {
// only one of the fields should be set as the source of the OpenAPI v3 or Swagger v2 spec
PathToFile string `json:"pathToFile,omitempty" xml:"pathToFile,omitempty"`
Url string `json:"url,omitempty" xml:"url,omitempty"`
Content string `json:"content,omitempty" xml:"content,omitempty"`
}
type ProtectedResourceResponse ¶
type ProtectedResourceResponse struct {
Message string `json:"message,omitempty" xml:"message,omitempty"`
}
type ProteusHints ¶
type ProteusHintsApiKeyAuth ¶
type RestEndpoint ¶
type RestEndpoint struct {
Path string `json:"path,omitempty" xml:"path,omitempty"`
Method string `json:"method,omitempty" xml:"method,omitempty"`
Description string `json:"description,omitempty" xml:"description,omitempty"`
DefaultResponseStatusCode int `json:"defaultResponseStatusCode,omitempty" xml:"defaultResponseStatusCode,omitempty"`
Responses map[string]RestEndpointResponseStructure `json:"responses,omitempty" xml:"responses,omitempty"`
}
type RestEndpointCookie ¶
type RestEndpointHeader ¶
type RestEndpointResponseBody ¶
type RestEndpointResponseBody struct {
ContentType string `json:"contentType,omitempty" xml:"contentType,omitempty"`
AsString string `json:"asString,omitempty" xml:"asString,omitempty"`
AsBase64 string `json:"asBase64,omitempty" xml:"asBase64,omitempty"`
}
func (*RestEndpointResponseBody) BodyAsString ¶
func (rerb *RestEndpointResponseBody) BodyAsString() (string, string, error)
type RestEndpointResponseStructure ¶
type RestEndpointResponseStructure struct {
Body []RestEndpointResponseBody `json:"body,omitempty" xml:"body,omitempty"`
Headers []RestEndpointHeader `json:"headers,omitempty" xml:"headers,omitempty"`
Cookies []RestEndpointCookie `json:"cookies,omitempty" xml:"cookies,omitempty"`
}
func (*RestEndpointResponseStructure) Get ¶
func (r *RestEndpointResponseStructure) Get(mediaType string) *RestEndpointResponseBody
func (*RestEndpointResponseStructure) GetMediaTypesAsString ¶
func (r *RestEndpointResponseStructure) GetMediaTypesAsString() string
type SmartCreatedResponse ¶
type SmartCreatedResponse struct {
Id string `json:"id,omitempty" xml:"id,omitempty"`
}
type SmartInstance ¶
Click to show internal directories.
Click to hide internal directories.