lib

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DreamkastClient

type DreamkastClient interface {
	GenerateAuth0Token(ctx context.Context, auth0Domain, auth0ClientId, auth0ClientSecret, auth0Audience string) error
	ListTracks(ctx context.Context, eventAbbr string) (ListTracksResp, error)
	ListTalks(ctx context.Context, eventAbbr string, trackId int32) (ListTalksResp, error)
	UpdateTalk(ctx context.Context, talkId int32, onAir bool) error
}

func NewClient

func NewClient(dkEndpointUrl string) (DreamkastClient, error)

func NewDreamkastClientWrapper

func NewDreamkastClientWrapper(dkEndpointUrl string) (DreamkastClient, error)

type DreamkastClientImpl

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

func (*DreamkastClientImpl) GenerateAuth0Token

func (c *DreamkastClientImpl) GenerateAuth0Token(ctx context.Context,
	auth0Domain, auth0ClientId, auth0ClientSecret, auth0Audience string,
) error

func (*DreamkastClientImpl) ListTalks

func (c *DreamkastClientImpl) ListTalks(ctx context.Context, eventAbbr string, trackId int32) (ListTalksResp, error)

func (*DreamkastClientImpl) ListTracks

func (c *DreamkastClientImpl) ListTracks(ctx context.Context, eventAbbr string) (ListTracksResp, error)

func (*DreamkastClientImpl) UpdateTalk

func (c *DreamkastClientImpl) UpdateTalk(ctx context.Context, talkId int32, onAir bool) error

TODO: set Token to header TODO: write test

type DreamkastClientWrapper

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

func (DreamkastClientWrapper) GenerateAuth0Token

func (w DreamkastClientWrapper) GenerateAuth0Token(ctx context.Context, auth0Domain, auth0ClientId, auth0ClientSecret, auth0Audience string) error

func (DreamkastClientWrapper) ListTalks

func (w DreamkastClientWrapper) ListTalks(ctx context.Context, eventAbbr string, trackId int32) (ListTalksResp, error)

func (DreamkastClientWrapper) ListTracks

func (w DreamkastClientWrapper) ListTracks(ctx context.Context, eventAbbr string) (ListTracksResp, error)

func (DreamkastClientWrapper) UpdateTalk

func (w DreamkastClientWrapper) UpdateTalk(ctx context.Context, talkId int32, onAir bool) error

type ErrorUnauthorized

type ErrorUnauthorized struct{}

func (ErrorUnauthorized) Error

func (e ErrorUnauthorized) Error() string

type GetTalksResp

type GetTalksResp struct {
	ID                 int32       `json:"id"`
	ConferenceID       int32       `json:"conference_id"`
	TrackID            int32       `json:"trackID"`
	VideoPlatform      interface{} `json:"videoPlatform"`
	VideoID            string      `json:"videoID"`
	Title              string      `json:"title"`
	Abstract           string      `json:"abstract"`
	Speakers           []Speaker   `json:"speakers"`
	DayID              int32       `json:"dayID"`
	ShowOnTimetable    bool        `json:"showOnTimetable"`
	StartTime          time.Time   `json:"startTime"`
	EndTime            time.Time   `json:"endTime"`
	TalkDuration       int32       `json:"talkDuration"`
	TalkDifficulty     string      `json:"talkDifficulty"`
	TalkCategory       string      `json:"talkCategory"`
	OnAir              bool        `json:"onAir"`
	DocumentURL        string      `json:"documentUrl"`
	ConferenceDayID    int32       `json:"conferenceDayID"`
	ConferenceDayDate  string      `json:"conferenceDayDate"`
	StartOffset        int32       `json:"startOffset"`
	EndOffset          int32       `json:"endOffset"`
	ActualStartTime    time.Time   `json:"actualStartTime"`
	ActualEndTime      time.Time   `json:"actualEndTime"`
	PresentationMethod *string     `json:"presentationMethod"`
}

type ListTalksResp

type ListTalksResp []GetTalksResp

type ListTracksResp

type ListTracksResp []struct {
	ID            int32     `json:"id"`
	Name          string    `json:"name"`
	VideoPlatform string    `json:"video_platform"`
	VideoID       *string   `json:"video_id"`
	ChannelArn    *string   `json:"channel_arn"`
	OnAirTalk     OnAirTalk `json:"on_air_talk"`
}

type OnAirTalk

type OnAirTalk struct {
	ID            int32     `json:"id"`
	TalkID        int32     `json:"talk_id"`
	Site          *string   `json:"site"`
	Url           *string   `json:"url"`
	OnAir         bool      `json:"on_air"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
	VideoID       string    `json:"video_id"`
	SlidoID       *string   `json:"slido_id"`
	VideoFileData *string   `json:"video_file_data"`
}

type Speaker

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

type UpdateTalksReq

type UpdateTalksReq struct {
	OnAir bool
}

Jump to

Keyboard shortcuts

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