Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidMemberType = errors.New("invalid member type")
ErrInvalidMemberType is returned when the member type is invalid
Functions ¶
This section is empty.
Types ¶
type Member ¶
type Member struct {
// contains filtered or unexported fields
}
Member represents a member of the film crew
func NewMember ¶
func NewMember(name string, crewType MemberType, availability [][]time.Time) Member
NewMember creates a new member of the film crew given its name, type and availability
func ParseTimeTable ¶
ParseTimeTable parses a time table into the data needed to create a crew member given its file path. filePath contains the filepath of the time table (a csv file). This function returns a Member object or an error if something goes wrong.
func (Member) GetAvailability ¶
GetAvailability returns the availability of the crew member
func (Member) GetCrewType ¶
func (m Member) GetCrewType() MemberType
GetCrewType returns the type of the crew member
type MemberType ¶
type MemberType int
MemberType represents the different kinds of crew members of the shooting plan
const ( Actor MemberType = iota Crew )
func MemberTypeFromString ¶
func MemberTypeFromString(stringMemberType string) (MemberType, error)
MemberTypeFromString converts stringMemberType to a MemberType and returns an error if the string is invalid
type PlannedShot ¶
type PlannedShot struct {
// contains filtered or unexported fields
}
PlannedShot represents a shot that is planned in the shooting plan
type ShootingPlan ¶
type ShootingPlan struct {
// contains filtered or unexported fields
}
ShootingPlan represents the shooting plan
type Shot ¶
type Shot struct { EstimatedDuration time.Duration Cast []Member Crew []Member Setting string Scene string Id string Details string }
Shot represents a shot in a the shooting plan
func NewShot ¶
func NewShot(estimatedDuration time.Duration, cast []Member, crew []Member, setting, scene, id, details string) Shot
NewShot returns a new shot given its estimated duration, cast, crew, setting, scene, shot identifier and some details for that shot.
func ParseTechnicalGuide ¶
ParseTechnicalGuide parses a technical guide into the data needed to create a list of shots. Argument filePath contains the filepath of the technical guide (a csv file) and members is the list of Member objects that participate in those shots. This function returns a list containing the shots found on the file, or an error if something goes wrong.