router

package
v0.0.0-...-d8258db Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAlreadyClosed 既に閉じられています
	ErrAlreadyClosed = errors.New("already closed")
	// ErrBufferIsFull 送信バッファが溢れました
	ErrBufferIsFull = errors.New("buffer is full")
)

Functions

func Setup

func Setup(repo repository.Repository) *echo.Echo

Types

type Client

type Client interface {
	Key() string
	// UserID このセッションのUserID
	UserID() uuid.UUID
}

type ErrorBody

type ErrorBody struct {
	Message       string `json:"message,omitempty"`
	Specification string `json:"specification,omitempty"`
	// contains filtered or unexported fields
}

type ErrorResponse

type ErrorResponse struct {
	ErrorBody `json:"errors"`
}

type Handlers

type Handlers struct {
	Repo repository.Repository

	SessionOption sessions.Options
	ClientID      string
	// contains filtered or unexported fields
}

func (*Handlers) AdminUserMiddleware

func (h *Handlers) AdminUserMiddleware(next echo.HandlerFunc) echo.HandlerFunc

AdminUserMiddleware 管理者ユーザーか判定するミドルウェア

func (*Handlers) DeletePresentation

func (h *Handlers) DeletePresentation(c echo.Context) error

DeletePresentation DELETE /presentations/:presentationID

func (*Handlers) GetGeneratedCode

func (h *Handlers) GetGeneratedCode(c echo.Context) error

GetGeneratedCode GET /oauth2/generate/code

func (*Handlers) GetLiveID

func (h *Handlers) GetLiveID(c echo.Context) error

func (*Handlers) GetPresentation

func (h *Handlers) GetPresentation(c echo.Context) error

GetPresentation GET /presentations/:presentationID

func (*Handlers) GetPresentationComments

func (h *Handlers) GetPresentationComments(c echo.Context) error

GetPresentationComments GET /presentations/:presentationID/comments

func (*Handlers) GetPresentationReaction

func (h *Handlers) GetPresentationReaction(c echo.Context) error

GetPresentationReaction GET /presentations/:presentationID/reaction

func (*Handlers) GetPresentationReview

func (h *Handlers) GetPresentationReview(c echo.Context) error

GetPresentationReview GET /presentations/:presentationID/review

func (*Handlers) GetPresentations

func (h *Handlers) GetPresentations(c echo.Context) error

GetPresentations GET /presentations

func (*Handlers) GetUserMe

func (h *Handlers) GetUserMe(c echo.Context) error

HandleGetUserMe ヘッダー情報からuser情報を取得 認証状態を確認

func (*Handlers) IsTraQUserMiddleware

func (h *Handlers) IsTraQUserMiddleware(next echo.HandlerFunc) echo.HandlerFunc

TraQUserMiddleware traQユーザーか判定するミドルウェア

func (*Handlers) PatchPresentation

func (h *Handlers) PatchPresentation(c echo.Context) error

PatchPresentation PATCH /presentations/:presentationID

func (*Handlers) PatchPresentationReview

func (h *Handlers) PatchPresentationReview(c echo.Context) error

PatchPresentationReview PATCH /presentations/:presentationID/review

func (*Handlers) PostPresentationReview

func (h *Handlers) PostPresentationReview(c echo.Context) error

PostPresentationReview POST /presentations/:presentationID/review

func (*Handlers) PostPresentations

func (h *Handlers) PostPresentations(c echo.Context) error

PostPresentations POST /presentations

func (*Handlers) PostState

func (h *Handlers) PostState(c echo.Context) error

PostState POST /state

func (*Handlers) PutLiveID

func (h *Handlers) PutLiveID(c echo.Context) error

func (*Handlers) WatchCallbackMiddleware

func (h *Handlers) WatchCallbackMiddleware(next echo.HandlerFunc) echo.HandlerFunc

WatchCallbackMiddleware /callback?code= を監視

type Live

type Live struct {
	ID string `json:"liveId"`
}

type PatchPresentationsStruct

type PatchPresentationsStruct struct {
	Name        utils.String `json:"name"`
	Speakers    utils.String `json:"speakers"`
	Description utils.String `json:"description"`
}

type PostPresentationsStruct

type PostPresentationsStruct struct {
	Name        string `json:"name"`
	Speakers    string `json:"speakers"`
	Description string `json:"description"`
}

type PostReviewStruct

type PostReviewStruct struct {
	Skill        int `json:"skill" db:"skill"`
	Artistry     int `json:"artistry" db:"artistry"`
	Idea         int `json:"idea" db:"idea"`
	Presentation int `json:"presentation" db:"presentation"`
}

type RuntimeCallerStruct

type RuntimeCallerStruct struct {
	ProgramCounter uintptr
	SourceFile     string
	Line           int
	// contains filtered or unexported fields
}

type Streamer

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

やっぱhub必要かも Streamer WebSocketストリーマー

func NewStreamer

func NewStreamer(repo repository.Repository) *Streamer

NewStreamer WebSocketストリーマーを生成し起動します

func (*Streamer) Close

func (s *Streamer) Close() error

Close ストリーマーを停止します

func (*Streamer) IsClosed

func (s *Streamer) IsClosed() bool

IsClosed ストリーマーが停止しているかどうか

func (*Streamer) SendAll

func (s *Streamer) SendAll(m *Message)

SendAll すべてのclientにメッセージを送る

func (*Streamer) SendState

func (s *Streamer) SendState(st *State)

SendState すべてのclientに新しいstateを送る

func (*Streamer) ServeHTTP

func (s *Streamer) ServeHTTP(c echo.Context)

ServeHTTP http.Handlerインターフェイスの実装

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
	IDToken      string `json:"id_token"`
}

Jump to

Keyboard shortcuts

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