Documentation ¶
Index ¶
- Variables
- func UnmarshallToCore(bytes []byte) (model.Resource, error)
- type Api
- type ApiDescriptor
- type ByMeta
- type Resource
- type ResourceApi
- type ResourceList
- type ResourceListReceiver
- type ResourceMeta
- func (r *ResourceMeta) GetCreationTime() time.Time
- func (r *ResourceMeta) GetMesh() string
- func (r *ResourceMeta) GetModificationTime() time.Time
- func (r *ResourceMeta) GetName() string
- func (r *ResourceMeta) GetNameExtensions() model.ResourceNameExtensions
- func (r *ResourceMeta) GetVersion() string
Constants ¶
This section is empty.
Variables ¶
View Source
var From = &from{}
Functions ¶
Types ¶
type Api ¶
type Api interface {
GetResourceApi(model.ResourceType) (ResourceApi, error)
}
type ApiDescriptor ¶
type ApiDescriptor struct {
Resources map[model.ResourceType]ResourceApi
}
func (*ApiDescriptor) GetResourceApi ¶
func (m *ApiDescriptor) GetResourceApi(typ model.ResourceType) (ResourceApi, error)
type Resource ¶
type Resource struct { Meta ResourceMeta Spec model.ResourceSpec }
func NewFromModel ¶ added in v1.8.1
NewFromModel create a REST Resource from the given model Resource.
func Unmarshall ¶
func (*Resource) MarshalJSON ¶
func (*Resource) UnmarshalJSON ¶
type ResourceApi ¶
func NewResourceApi ¶
func NewResourceApi(scope model.ResourceScope, path string) ResourceApi
type ResourceList ¶
type ResourceListReceiver ¶
type ResourceListReceiver struct { ResourceList NewResource func() model.Resource }
func (*ResourceListReceiver) UnmarshalJSON ¶
func (rec *ResourceListReceiver) UnmarshalJSON(data []byte) error
type ResourceMeta ¶
type ResourceMeta struct { Type string `json:"type"` Mesh string `json:"mesh,omitempty"` Name string `json:"name"` CreationTime time.Time `json:"creationTime"` ModificationTime time.Time `json:"modificationTime"` }
func (*ResourceMeta) GetCreationTime ¶
func (r *ResourceMeta) GetCreationTime() time.Time
func (*ResourceMeta) GetMesh ¶
func (r *ResourceMeta) GetMesh() string
func (*ResourceMeta) GetModificationTime ¶
func (r *ResourceMeta) GetModificationTime() time.Time
func (*ResourceMeta) GetName ¶
func (r *ResourceMeta) GetName() string
func (*ResourceMeta) GetNameExtensions ¶
func (r *ResourceMeta) GetNameExtensions() model.ResourceNameExtensions
func (*ResourceMeta) GetVersion ¶
func (r *ResourceMeta) GetVersion() string
Click to show internal directories.
Click to hide internal directories.