Documentation
¶
Index ¶
- Constants
- func CreateProduction(ctx context.Context, name, title, summary, clientID string) (*podops.Production, error)
- func DeleteResource(ctx context.Context, guid string) error
- func EnsureAsset(ctx context.Context, production string, rsrc *podops.Asset) error
- func FindProductionByName(ctx context.Context, name string) (*podops.Production, error)
- func FindProductionsByOwner(ctx context.Context, owner string) ([]*podops.Production, error)
- func FindResource(ctx context.Context, production, name string) (*podops.Resource, error)
- func GetProduction(ctx context.Context, production string) (*podops.Production, error)
- func GetResource(ctx context.Context, guid string) (*podops.Resource, error)
- func GetResourceContent(ctx context.Context, guid string) (interface{}, error)
- func ImportResource(ctx context.Context, src, dest, original string) int
- func ListResources(ctx context.Context, production, kind string) ([]*podops.Resource, error)
- func LoadResource(data []byte) (interface{}, string, string, error)
- func LoadResourceMetadata(data []byte) (*podops.ResourceMetadata, error)
- func NormalizeKind(kind string) (string, error)
- func ReadResource(ctx context.Context, path string) (interface{}, string, string, error)
- func RemoveAsset(ctx context.Context, path string) error
- func RemoveResource(ctx context.Context, path string) error
- func UpdateAsset(ctx context.Context, ...) error
- func UpdateEpisode(ctx context.Context, location string, episode *podops.Episode) error
- func UpdateProduction(ctx context.Context, p *podops.Production) error
- func UpdateResource(ctx context.Context, name, guid, kind, production, location string) error
- func UpdateShow(ctx context.Context, location string, show *podops.Show) error
- func ValidateProduction(ctx context.Context, production string) error
- func WriteResourceContent(ctx context.Context, path string, create, force bool, rsrc interface{}) error
- type ContentMetadata
- type ResourceLoaderFunc
Constants ¶
const (
// DatastoreProductions collection PRODUCTION
DatastoreProductions = "PRODUCTIONS"
)
const (
// DatastoreResources collection RESOURCE
DatastoreResources = "RESOURCES"
)
const (
// full canonical route
ImportTaskWithPrefix = "/_t/import"
)
Variables ¶
This section is empty.
Functions ¶
func CreateProduction ¶
func CreateProduction(ctx context.Context, name, title, summary, clientID string) (*podops.Production, error)
CreateProduction initializes a new show and all its metadata
func DeleteResource ¶
DeleteResource deletes a resource and it's backing .yaml file
func EnsureAsset ¶
EnsureAsset validates the existence of the asset and imports it if necessary
func FindProductionByName ¶
FindProductionByName does a lookup using the productions name instead of its key
func FindProductionsByOwner ¶
FindProductionsByOwner returns all productions belonging to the same owner
func FindResource ¶
FindResource looks for a resource 'name' in the context of production 'production'
func GetProduction ¶
GetProduction returns a production based on the GUID
func GetResource ¶
GetResource retrieves a resource
func GetResourceContent ¶
GetResourceContent retrieves a resource file
func ImportResource ¶
ImportResource import a resource from a src and place it into the CDN
func ListResources ¶
ListResources returns all resources of type kind belonging to parentID
func LoadResource ¶
LoadResource takes a byte array and determines its kind before unmarshalling it into its struct form
func LoadResourceMetadata ¶
func LoadResourceMetadata(data []byte) (*podops.ResourceMetadata, error)
LoadResourceMetadata reads only the metadata of a resource
func NormalizeKind ¶
func ReadResource ¶
ReadResource reads a resource from Cloud Storage
func RemoveAsset ¶
RemoveAsset removes a asset from Cloud Storage
func RemoveResource ¶
RemoveResource removes a resource from Cloud Storage
func UpdateAsset ¶
func UpdateAsset(ctx context.Context, name, guid, kind, production, location, contentType, original, etag string, size, duration int64) error
UpdateAsset updates the resource inventory
func UpdateEpisode ¶
UpdateEpisode is a helper function to update a episode resource
func UpdateProduction ¶
func UpdateProduction(ctx context.Context, p *podops.Production) error
UpdateProduction does what the name suggests
func UpdateResource ¶
UpdateResource updates the resource inventory
func UpdateShow ¶
UpdateShow is a helper function to update a show resource
func ValidateProduction ¶
ValidateProduction checks the integrity of a production and fixes issues if possible
Types ¶
type ContentMetadata ¶
type ContentMetadata struct {
Size int64
Duration int64
ContentType string
Etag string
Timestamp int64
}
ContentMetadata keeps basic data on resource
type ResourceLoaderFunc ¶
ResourceLoaderFunc implements loading of resources