Documentation
¶
Index ¶
- Constants
- func Build(ctx context.Context, guid string) error
- func LoadResource(data []byte) (interface{}, string, string, error)
- func LoadResourceMetadata(data []byte) (*metadata.ResourceMetadata, error)
- func ReadResource(ctx context.Context, path string) (interface{}, string, string, error)
- func WriteResource(ctx context.Context, path string, create, force bool, rsrc interface{}) error
- type EpisodeList
- type Production
- func CreateProduction(ctx context.Context, name, title, summary, clientID string) (*Production, error)
- func FindProductionByName(ctx context.Context, name string) (*Production, error)
- func FindProductionsByOwner(ctx context.Context, owner string) ([]*Production, error)
- func GetProduction(ctx context.Context, guid string) (*Production, error)
- type ResourceLoaderFunc
Constants ¶
View Source
const (
// DatastoreProductions collection PRODUCTION
DatastoreProductions = "PRODUCTIONS"
)
Variables ¶
This section is empty.
Functions ¶
func LoadResource ¶
LoadResource takes a byte array and determines its kind before unmarshalling it into its struct form
func LoadResourceMetadata ¶
func LoadResourceMetadata(data []byte) (*metadata.ResourceMetadata, error)
LoadResourceMetadata reads only the metadata of a resource
func ReadResource ¶
ReadResource reads a resource from Cloud Storage
Types ¶
type EpisodeList ¶
func (EpisodeList) Len ¶
func (e EpisodeList) Len() int
func (EpisodeList) Less ¶
func (e EpisodeList) Less(i, j int) bool
func (EpisodeList) Swap ¶
func (e EpisodeList) Swap(i, j int)
type Production ¶
type Production struct {
GUID string `json:"guid"`
Owner string `json:"owner"`
Name string `json:"name"`
Title string `json:"title"`
Summary string `json:"summary"`
Feed string `json:"feed"`
NewFeed string `json:"newFeed"`
PubDate int64 `json:"pub_date"`
BuildDate int64 `json:"build_date"`
// internal
Created int64 `json:"-"`
Updated int64 `json:"-"`
}
Production holds the shows main data
func CreateProduction ¶
func CreateProduction(ctx context.Context, name, title, summary, clientID string) (*Production, error)
CreateProduction initializes a new show and all its metadata
func FindProductionByName ¶
func FindProductionByName(ctx context.Context, name string) (*Production, error)
FindProductionByName does a lookup using the productions name instead of its key
func FindProductionsByOwner ¶
func FindProductionsByOwner(ctx context.Context, owner string) ([]*Production, error)
FindProductionsByOwner returns all productions belonging to the same owner
func GetProduction ¶
func GetProduction(ctx context.Context, guid string) (*Production, error)
GetProduction returns a production based on the GUID
type ResourceLoaderFunc ¶
ResourceLoaderFunc implements loading of resources
Click to show internal directories.
Click to hide internal directories.