backend

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DatastoreProductions collection PRODUCTION
	DatastoreProductions = "PRODUCTIONS"
)
View Source
const (
	// DatastoreResources collection RESOURCE
	DatastoreResources = "RESOURCES"
)

Variables

This section is empty.

Functions

func CreateProduction

func CreateProduction(ctx context.Context, name, title, summary, clientID string) (*a.Production, error)

CreateProduction initializes a new show and all its metadata

func DeleteResource

func DeleteResource(ctx context.Context, guid string) error

DeleteResource deletes a resource and it's backing .yaml file

func FindProductionByName

func FindProductionByName(ctx context.Context, name string) (*a.Production, error)

FindProductionByName does a lookup using the productions name instead of its key

func FindProductionsByOwner

func FindProductionsByOwner(ctx context.Context, owner string) ([]*a.Production, error)

FindProductionsByOwner returns all productions belonging to the same owner

func FindResource

func FindResource(ctx context.Context, parent, name string) (*a.Resource, error)

FindResource looks for a resource 'name' in the context of production 'parent'

func GetProduction

func GetProduction(ctx context.Context, guid string) (*a.Production, error)

GetProduction returns a production based on the GUID

func GetResource

func GetResource(ctx context.Context, guid string) (*a.Resource, error)

GetResource retrieves a resource

func GetResourceContent

func GetResourceContent(ctx context.Context, guid string) (interface{}, error)

GetResourceContent retrieves a resource file

func ListResources

func ListResources(ctx context.Context, parent, kind string) ([]*a.Resource, error)

ListResources returns all resources of type kind belonging to parentID

func ReadResource

func ReadResource(ctx context.Context, path string) (interface{}, string, string, error)

ReadResource reads a resource from Cloud Storage

func RemoveAsset

func RemoveAsset(ctx context.Context, path string) error

RemoveAsset removes a asset from Cloud Storage

func RemoveResource

func RemoveResource(ctx context.Context, path string) error

RemoveResource removes a resource from Cloud Storage

func UpdateAssetResource

func UpdateAssetResource(ctx context.Context, name, guid, kind, parent, location, contentType string, size int64) error

UpdateAssetResource updates the resource inventory

func UpdateEpisode

func UpdateEpisode(ctx context.Context, location string, episode *a.Episode) error

UpdateEpisode is a helper function to update a episode resource

func UpdateProduction

func UpdateProduction(ctx context.Context, p *a.Production) error

UpdateProduction does what the name suggests

func UpdateResource

func UpdateResource(ctx context.Context, name, guid, kind, parent, location string) error

UpdateResource updates the resource inventory

func UpdateShow

func UpdateShow(ctx context.Context, location string, show *a.Show) error

UpdateShow is a helper function to update a show resource

func WriteResourceContent

func WriteResourceContent(ctx context.Context, path string, create, force bool, rsrc interface{}) error

WriteResourceContent creates a resource .yaml file. An existing resource will be overwritten if force==true

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL