Documentation
¶
Index ¶
- Constants
- func ConvertConsumer(consumer openapi.Consumer) *api.Consumer
- func ObjectKind(i interface{}) *string
- func ObjectPath(id string, obj interface{}) *string
- func PresentConsumer(consumer *api.Consumer) openapi.Consumer
- func PresentError(err *errors.ServiceError) openapi.Error
- func PresentReference(id, obj interface{}) openapi.ObjectReference
- func PresentResourceBundle(resource *api.Resource) (*openapi.ResourceBundle, error)
- type ProjectionList
Constants ¶
View Source
const (
BasePath = "/api/maestro/v1"
)
Variables ¶
This section is empty.
Functions ¶
func ObjectKind ¶
func ObjectKind(i interface{}) *string
func ObjectPath ¶
func PresentError ¶
func PresentError(err *errors.ServiceError) openapi.Error
func PresentReference ¶
func PresentReference(id, obj interface{}) openapi.ObjectReference
func PresentResourceBundle ¶
func PresentResourceBundle(resource *api.Resource) (*openapi.ResourceBundle, error)
PresentResourceBundle converts a resource from the API to the openapi representation.
Types ¶
type ProjectionList ¶
type ProjectionList struct { Kind string `json:"kind"` Page int32 `json:"page"` Size int32 `json:"size"` Total int32 `json:"total"` Items []map[string]interface{} `json:"items"` }
func SliceFilter ¶
func SliceFilter(fields2Store []string, model interface{}) (*ProjectionList, *errors.ServiceError)
SliceFilter
Convert slice of structures to a []byte stream. Non-existing fields will cause a validation error
@param fields2Store []string - list of fields to export (from `json` tag)
@param items []interface{} - slice of structures to export
@param kind, page, size, total - from openapi.SubscriptionList et al.
@return []byte
Click to show internal directories.
Click to hide internal directories.