Documentation
¶
Index ¶
- Constants
- func ConvertDinosaur(dinosaur openapi.Dinosaur) *api.Dinosaur
- func ObjectKind(i interface{}) *string
- func ObjectPath(id string, obj interface{}) *string
- func PresentDinosaur(dinosaur *api.Dinosaur) openapi.Dinosaur
- func PresentError(err *errors.ServiceError) openapi.Error
- func PresentReference(id, obj interface{}) openapi.ObjectReference
- func PresentTime(t time.Time) *time.Time
- type ProjectionList
Constants ¶
View Source
const (
BasePath = "/api/rh-trex/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
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.