Documentation ¶
Overview ¶
Package speaker provides functions to add, create, edit, delete, and show speakers
Index ¶
- func CheckSpeaker(city, year, speaker string) bool
- func CreateSpeaker(speakerName, city, year string) (err error)
- func GetSpeakers(city, year string) ([]string, error)
- func NewSpeaker(speaker Speaker, city string, year string) (err error)
- func ShowSpeakers(city, year string) (exitCode bool, err error)
- func SpeakerImage(srcPath, speaker, city, year string) (imageFile string)
- func TOMLHandler(front string) (map[string]interface{}, error)
- type Speaker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSpeaker ¶
CheckSpeaker takes in three arguments, the city, the year, and the cleaned name of a speaker, and returns true if the speaker already exists.
func CreateSpeaker ¶
CreateSpeaker takes input from the user to create a new speaker
func GetSpeakers ¶
GetSpeakers takes in the city and year and returns a list of the talks
func NewSpeaker ¶
NewSpeaker takes in a constructed Speaker type and generates the stuff
func ShowSpeakers ¶
ShowSpeakers provides an interactive list of existing speakers for an event, and then displays details about a selected speaker.
func SpeakerImage ¶
SpeakerImage takes in a path to an image and resizes it to the proper dimensions and copies it to the destination
func TOMLHandler ¶
TOMLHandler decodes TOML string into a go map[string]interface{}
Types ¶
type Speaker ¶
type Speaker struct { Name string Title string Website string `toml:"website,omitempty"` Twitter string `toml:"twitter,omitempty"` Facebook string `toml:"facebook,omitempty"` Linkedin string `toml:"linkedin,omitempty"` Github string `toml:"github,omitempty"` Gitlab string `toml:"gitlab,omitempty"` ImagePath string `toml:"image,omitempty"` Bio string }
Speaker defines a devopsdays event's speaker
func GetSpeakerInfo ¶
GetSpeakerInfo takes the filename, city, and year of a speaker and returns a Speaker object with the details.