Documentation

Index

Constants

View Source
const (
	StoriesCollection = "stories2"
)

Variables

This section is empty.

Functions

func GetFirestoreClient

func GetFirestoreClient(ctx context.Context) *firestore.Client

GetFirestoreClient authenticates firestore client. panic on failure

func GetSheetsService

func GetSheetsService(ctx context.Context) *sheets.Service

GetSheetsService authenticates to sheets api. panic on failure

Types

type Answer

type Answer struct {
	Character string
	Details   string
}

type Character

type Character struct {
	Blurb       string
	Name        string
	Costume     string
	Accessories string
}

type Clue

type Clue struct {
	CharacterName string
	Description   string
	Name          string
	Round         string
	URL           *url.URL
}

type Info

type Info struct {
	Round     string
	Character string
	Public    bool
	Content   string
}

type Metadata

type Metadata struct {
	Name       string
	Blurb      string
	Conclusion string
}

type Round

type Round struct {
	Intro string
	Name  string
}

type Server

type Server struct {
	SheetsClient    *sheets.Service
	FirestoreClient *firestore.Client
}

func InitServer

func InitServer(ctx context.Context) (s *Server)

InitServer gives you the object off which to hang most functions. panics on fail for certain initialisation

func (*Server) SyncStory

func (s *Server) SyncStory(story Story)

type SheetsMetadata

type SheetsMetadata struct {
	SheetsToMonitor []string
}

type Story

type Story struct {
	SheetID        string
	ID             string
	Name           string
	Conclusion     string
	Rounds         []Round
	Clues          []Clue
	Characters     []Character
	Blurb          string
	Answers        []Answer
	Info           []Info
	TimelineEvents []TimelineEvent
}

type TimelineEvent

type TimelineEvent struct {
	Character string
	Time      string
	Event     string
}