Documentation ¶
Index ¶
- func AppendResourceData(newResources map[string]Resource)
- func ConvertUriTemplateValueToType(value string) string
- func GenerateResourceMetadataFromYaml(yamlTxt string) (map[string]Resource, error)
- func GenerateUrl(urlInfo *CrudEntityInfo, args []string, useAliases bool) (string, error)
- func GenerateUrlViaIdableAttributes(urlInfo *CrudEntityInfo, args []id.IdableAttributes) (string, error)
- func GetNumberOfVariablesNeeded(url string) (int, error)
- func GetPluralResourceNames() []string
- func GetPluralResources() map[string]Resource
- func GetSingularResourceNames() []string
- func GetSingularTypesOfVariablesNeeded(url string) ([]string, error)
- func GetTypesOfVariablesNeeded(url string) ([]string, error)
- func PublicInit()
- type CrudEntityAttribute
- type CrudEntityInfo
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendResourceData ¶ added in v0.6.0
func ConvertUriTemplateValueToType ¶ added in v0.10.0
func GenerateResourceMetadataFromYaml ¶ added in v0.6.0
func GenerateUrl ¶ added in v0.1.0
func GenerateUrl(urlInfo *CrudEntityInfo, args []string, useAliases bool) (string, error)
func GenerateUrlViaIdableAttributes ¶ added in v0.7.0
func GenerateUrlViaIdableAttributes(urlInfo *CrudEntityInfo, args []id.IdableAttributes) (string, error)
func GetNumberOfVariablesNeeded ¶ added in v0.1.0
func GetPluralResourceNames ¶ added in v0.1.0
func GetPluralResourceNames() []string
func GetPluralResources ¶ added in v0.1.0
func GetSingularResourceNames ¶ added in v0.1.0
func GetSingularResourceNames() []string
func GetSingularTypesOfVariablesNeeded ¶ added in v0.10.0
func GetTypesOfVariablesNeeded ¶ added in v0.5.0
func PublicInit ¶ added in v0.11.0
func PublicInit()
Types ¶
type CrudEntityAttribute ¶
type CrudEntityInfo ¶
type CrudEntityInfo struct { // A link to the docs specific for the Crud operation in EPCC. Docs string `yaml:"docs"` // The Url we should use when invoking this method. Url string `yaml:"url"` // Content type to send ContentType string `yaml:"content-type,omitempty"` // A list of valid query parameters QueryParameters string `yaml:"query,omitempty"` // Minimum resources so we don't keep trying to delete in MinResources int `yaml:"min,omitempty"` // Override the attribute we use in the URL for a specific key ParentResourceValueOverrides map[string]string `yaml:"parent_resource_value_overrides,omitempty"` }
type Resource ¶
type Resource struct { // The type as far as the EPCC CLI is concerned. Type string `yaml:"-"` // A link to the generic documentation page about a type in the EPCC API Docs string `yaml:"docs"` // The type that should be used in the JSON API. JsonApiType string `yaml:"json-api-type"` // Alterative types used for aliases AlternateJsonApiTypesForAliases []string `yaml:"alternate-json-type-for-aliases,omitempty"` // Some resources (e.g., PCM, accelerator svc, bury most attributes under the attributes key). This is considered "compliant", other services just bury attributes under data, this is "legacy. JsonApiFormat string `yaml:"json-api-format"` // Information about how to get a collection GetCollectionInfo *CrudEntityInfo `yaml:"get-collection,omitempty"` // Information about how to get a single object. GetEntityInfo *CrudEntityInfo `yaml:"get-entity,omitempty"` // Information about how to create an entity. CreateEntityInfo *CrudEntityInfo `yaml:"create-entity,omitempty"` // Information about how to update an entity. UpdateEntityInfo *CrudEntityInfo `yaml:"update-entity,omitempty"` // Information about how to delete an entity. DeleteEntityInfo *CrudEntityInfo `yaml:"delete-entity,omitempty"` Attributes map[string]*CrudEntityAttribute `yaml:"attributes,omitempty"` // If true, don't wrap json in a data tag NoWrapping bool `yaml:"no-wrapping,omitempty"` // The singular name version of the resource. SingularName string `yaml:"singular-name"` PluralName string `yaml:"-"` // Use this value to silence warnings about a resource not supporting resets. // This should only be used for cases where we manually fix things, or where // a store reset would clear a resource another way (e.g., the resource represents a projection). SuppressResetWarning bool `yaml:"suppress-reset-warning,omitempty"` }
func GetResourceByName ¶ added in v0.1.0
func GetSingularResourceByName ¶ added in v0.9.3
func MustGetResourceByName ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.