cfp

package
v0.0.0-...-294c8e8 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const URL = "https://conference-hall.io"

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	LatLng           LatLng `json:"latLng"`
	FormattedAddress string `json:"formattedAddress"`
}

type Category

type Category struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type ConferenceHallClient

type ConferenceHallClient struct {
	// contains filtered or unexported fields
}

func NewConferenceHallClient

func NewConferenceHallClient(opts ...ConferenceHallClientOption) ConferenceHallClient

func (ConferenceHallClient) Accept

func (c ConferenceHallClient) Accept(talk Talk) (string, error)

func (ConferenceHallClient) GetExport

func (c ConferenceHallClient) GetExport() (Export, error)

func (ConferenceHallClient) Reject

func (c ConferenceHallClient) Reject(talk Talk) (string, error)

type ConferenceHallClientOption

type ConferenceHallClientOption func(client *ConferenceHallClient)

func WithAPIKey

func WithAPIKey(apiKey string) ConferenceHallClientOption

func WithDryRun

func WithDryRun(dryRun bool) ConferenceHallClientOption

func WithEventID

func WithEventID(eventID string) ConferenceHallClientOption

func WithHTTPClient

func WithHTTPClient(client *http.Client) ConferenceHallClientOption

func WithURL

type ConferenceHallServer

type ConferenceHallServer struct {
	URL         string
	Client      *http.Client
	AcceptedIDs []string
	RejectedIDs []string
	// contains filtered or unexported fields
}

func NewConferenceHallServer

func NewConferenceHallServer(eventID, apiKey, jsonPath string) (*ConferenceHallServer, func())

func (*ConferenceHallServer) ServeHTTP

func (s *ConferenceHallServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Date

type Date struct {
	Seconds     int64 `json:"_seconds"`
	Nanoseconds int64 `json:"_nanoseconds"`
}

type Event

type Event struct {
	Name       string
	Proposals  []Proposal
	Formats    []string
	Categories []string
}

func Parse

func Parse(path string, locate geo.Locator) (Event, error)

func (Event) GetProposals

func (e Event) GetProposals(format string) []Proposal

func (Event) GetProposalsByCategory

func (e Event) GetProposalsByCategory(format string) map[string][]Proposal

type Export

type Export struct {
	Name       string     `json:"name"`
	Categories []Category `json:"categories"`
	Formats    []Format   `json:"formats"`
	Talks      []Talk     `json:"talks"`
	Speakers   []Speaker  `json:"speakers"`
}

type Format

type Format struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type LatLng

type LatLng struct {
	Lat float64 `json:"lat"`
	Lng float64 `json:"lng"`
}

type OrganizerThread

type OrganizerThread struct {
	DisplayName string `json:"displayName"`
	Message     string `json:"message"`
	Date        Date   `json:"date"`
}

type Proposal

type Proposal struct {
	ID                string
	Title             string
	Category          string
	Format            string
	Abstract          string
	AudienceLevel     string
	Language          string
	Speakers          string
	PrivateMessage    string
	Rating            float64
	Loves             int
	Hates             int
	OrganizerMessages []string
}

type Speaker

type Speaker struct {
	UID         string   `json:"uid"`
	DisplayName string   `json:"displayName"`
	Company     string   `json:"company"`
	Address     *Address `json:"address"`
	Email       string   `json:"email"`
}

type Talk

type Talk struct {
	ID               string            `json:"id"`
	Title            string            `json:"title"`
	State            string            `json:"state"`
	Level            string            `json:"level"`
	Abstract         string            `json:"abstract"`
	Categories       string            `json:"categories"` // plural but holds only one category
	Formats          string            `json:"formats"`    // plural but holds only one format
	Speakers         []string          `json:"speakers"`
	Comments         string            `json:"comments"`
	Rating           float64           `json:"rating"`
	Loves            int               `json:"loves"`
	Hates            int               `json:"hates"`
	Language         string            `json:"language"`
	OrganizersThread []OrganizerThread `json:"organizersThread"`
}

func (Talk) IsSubmitted

func (t Talk) IsSubmitted() bool

Jump to

Keyboard shortcuts

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