event

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: 17 Imported by: 0

Documentation

Overview

Package event provides the functions for creating, editing, and showing events

Index

Examples

Constants

This section is empty.

Variables

View Source
var LogoPath string

LogoPath is the fully qualified path to the event's logo

View Source
var SquareLogoPath string

SquareLogoPath is the fully qualified path to the event's square logo

Functions

func CheckEvent

func CheckEvent(city, year string) bool

CheckEvent takes in two arguments, the city and the year, and returns true if the city exists.

Example
city := "Ponyville"
year := "2017"
if CheckEvent(city, year) {
	fmt.Println("This event already exists. If you would like to edit it, please run `devopsdays-cli edit event`")
	return
}
Output:

func CityClean

func CityClean(city string) (cityClean string)

CityClean returns a city name all in lower case with spaces converted to dashes

func CreateEvent

func CreateEvent(city, year string) (err error)

CreateEvent takes input from the user to create a new event

func Logo(srcPath, city, year string) (err error)

Logo takes in a path to an event's main logo and copies/renames it to the proper destination

func LogoSquare

func LogoSquare(srcPath, city, year string) (err error)

LogoSquare takes in a path the event's square logo, and crops/resizes it and copies it to the proper destination

func NewEvent

func NewEvent(event model.Event, city string, year string) (err error)

NewEvent takes in a constructed Event type and generates the stuff

Types

This section is empty.

Jump to

Keyboard shortcuts

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