speaker

package
v0.0.0-...-f137246 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package speaker provides functions to add, create, edit, delete, and show speakers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSpeaker

func CheckSpeaker(city, year, speaker string) bool

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

func CreateSpeaker(speakerName, city, year string) (err error)

CreateSpeaker takes input from the user to create a new speaker

func GetSpeakers

func GetSpeakers(city, year string) ([]string, error)

GetSpeakers takes in the city and year and returns a list of the talks

func NewSpeaker

func NewSpeaker(speaker Speaker, city string, year string) (err error)

NewSpeaker takes in a constructed Speaker type and generates the stuff

func ShowSpeakers

func ShowSpeakers(city, year string) (exitCode bool, err error)

ShowSpeakers provides an interactive list of existing speakers for an event, and then displays details about a selected speaker.

func SpeakerImage

func SpeakerImage(srcPath, speaker, city, year string) (imageFile string)

SpeakerImage takes in a path to an image and resizes it to the proper dimensions and copies it to the destination

func TOMLHandler

func TOMLHandler(front string) (map[string]interface{}, error)

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

func GetSpeakerInfo(file, city, year string) (speaker Speaker, err error)

GetSpeakerInfo takes the filename, city, and year of a speaker and returns a Speaker object with the details.

Jump to

Keyboard shortcuts

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