v3

package
v1.0.0-rc.2.0...-638eaff Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotImplemented

func NotImplemented(c echo.Context) error

NotImplemented 未実装API. 501 NotImplementedを返す

Types

type Bot

type Bot struct {
	ID              uuid.UUID           `json:"id"`
	BotUserID       uuid.UUID           `json:"botUserId"`
	Description     string              `json:"description"`
	DeveloperID     uuid.UUID           `json:"developerId"`
	SubscribeEvents model.BotEventTypes `json:"subscribeEvents"`
	Mode            model.BotMode       `json:"mode"`
	State           model.BotState      `json:"state"`
	CreatedAt       time.Time           `json:"createdAt"`
	UpdatedAt       time.Time           `json:"updatedAt"`
}

type BotDetail

type BotDetail struct {
	ID              uuid.UUID           `json:"id"`
	BotUserID       uuid.UUID           `json:"botUserId"`
	Description     string              `json:"description"`
	DeveloperID     uuid.UUID           `json:"developerId"`
	SubscribeEvents model.BotEventTypes `json:"subscribeEvents"`
	Mode            model.BotMode       `json:"mode"`
	State           model.BotState      `json:"state"`
	CreatedAt       time.Time           `json:"createdAt"`
	UpdatedAt       time.Time           `json:"updatedAt"`
	Tokens          BotTokens           `json:"tokens"`
	Endpoint        string              `json:"endpoint"`
	Privileged      bool                `json:"privileged"`
	Channels        []uuid.UUID         `json:"channels"`
}

type BotTokens

type BotTokens struct {
	VerificationToken string `json:"verificationToken"`
	AccessToken       string `json:"accessToken"`
}

type CacheHitState

type CacheHitState int

type Channel

type Channel struct {
	ID       uuid.UUID     `json:"id"`
	Name     string        `json:"name"`
	ParentID optional.UUID `json:"parentId"`
	Topic    string        `json:"topic"`
	Children []uuid.UUID   `json:"children"`
	Archived bool          `json:"archived"`
	Force    bool          `json:"force"`
}

type ClipFolder

type ClipFolder struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	OwnerID     uuid.UUID `json:"ownerId"`
	CreatedAt   time.Time `json:"createdAt"`
}

type ClipFolderMessage

type ClipFolderMessage struct {
	Message   *Message  `json:"message"`
	ClippedAt time.Time `json:"clippedAt"`
}

type Config

type Config struct {
	Version  string
	Revision string

	// SkyWaySecretKey SkyWayクレデンシャル用シークレットキー
	SkyWaySecretKey string

	// AllowSignUp ユーザーが自分自身で登録できるかどうか
	AllowSignUp bool

	// EnabledExternalAccountLink リンク可能な外部認証アカウントのプロバイダ
	EnabledExternalAccountProviders map[string]bool
}

type CreateStampPaletteRequest

type CreateStampPaletteRequest struct {
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Stamps      model.UUIDs `json:"stamps"`
}

CreateStampPaletteRequest POST /stamp-palettes リクエストボディ

func (CreateStampPaletteRequest) Validate

func (r CreateStampPaletteRequest) Validate() error

type DMChannel

type DMChannel struct {
	ID     uuid.UUID `json:"id"`
	UserID uuid.UUID `json:"userId"`
}

type FileInfo

type FileInfo struct {
	ID              uuid.UUID             `json:"id"`
	Name            string                `json:"name"`
	Mime            string                `json:"mime"`
	Size            int64                 `json:"size"`
	MD5             string                `json:"md5"`
	IsAnimatedImage bool                  `json:"isAnimatedImage"`
	CreatedAt       time.Time             `json:"createdAt"`
	Thumbnail       *FileInfoOldThumbnail `json:"thumbnail"` // deprecated
	ChannelID       optional.UUID         `json:"channelId"`
	UploaderID      optional.UUID         `json:"uploaderId"`
	Thumbnails      []FileInfoThumbnail   `json:"thumbnails"`
}

type FileInfoOldThumbnail

type FileInfoOldThumbnail struct {
	Mime   string `json:"mime"`
	Width  int    `json:"width,omitempty"`
	Height int    `json:"height,omitempty"`
}

FileInfoOldThumbnail deprecated

type FileInfoThumbnail

type FileInfoThumbnail struct {
	Type   string `json:"type"`
	Mime   string `json:"mime"`
	Width  int    `json:"width,omitempty"`
	Height int    `json:"height,omitempty"`
}

type GetActivityTimelineRequest

type GetActivityTimelineRequest struct {
	Limit      int  `query:"limit"`
	All        bool `query:"all"`
	PerChannel bool `query:"per_channel"`
}

GetActivityTimelineRequest GET /activity/timeline リクエストボディ

func (*GetActivityTimelineRequest) Validate

func (r *GetActivityTimelineRequest) Validate() error

type GetBotLogsRequest

type GetBotLogsRequest struct {
	Limit  int `query:"limit"`
	Offset int `query:"offset"`
}

GetBotLogsRequest GET /bots/:botID/logs リクエストクエリ

func (*GetBotLogsRequest) Validate

func (r *GetBotLogsRequest) Validate() error

type GetFilesRequest

type GetFilesRequest struct {
	Limit     int           `query:"limit"`
	Offset    int           `query:"offset"`
	Since     optional.Time `query:"since"`
	Until     optional.Time `query:"until"`
	Inclusive bool          `query:"inclusive"`
	Order     string        `query:"order"`
	ChannelID uuid.UUID     `query:"channelId"`
	Mine      bool          `query:"mine"`
}

GetFilesRequest GET /files 用リクエストクエリ

func (*GetFilesRequest) Validate

func (q *GetFilesRequest) Validate() error

type GetMyStampHistoryRequest

type GetMyStampHistoryRequest struct {
	Limit int `query:"limit"`
}

GetMyStampHistoryRequest GET /users/me/stamp-history リクエストクエリ

func (*GetMyStampHistoryRequest) Validate

func (r *GetMyStampHistoryRequest) Validate() error

type GetStampsQuery

type GetStampsQuery struct {
	IncludeUnicode string `query:"include-unicode"`
	Type           string `query:"type"`
}

GetStampsQuery GET /stamps クエリパラメーター

func (GetStampsQuery) ValidateWithContext

func (q GetStampsQuery) ValidateWithContext(ctx context.Context) error

type Handlers

type Handlers struct {
	RBAC           rbac.RBAC
	Repo           repository.Repository
	WS             *ws.Streamer
	BotWS          *botWS.Streamer
	Hub            *hub.Hub
	Logger         *zap.Logger
	OC             *counter.OnlineCounter
	OGP            ogp.Service
	VM             *viewer.Manager
	WebRTC         *webrtcv3.Manager
	Imaging        imaging.Processor
	SessStore      session.Store
	SearchEngine   search.Engine
	ChannelManager channel.Manager
	MessageManager message.Manager
	FileManager    file.Manager
	Replacer       *mutil.Replacer
	Config
}

func (*Handlers) ActivateBot

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

ActivateBot POST /bots/:botID/actions/activate

func (*Handlers) AddMessageStamp

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

AddMessageStamp POST /messages/:messageID/stamps/:stampID

func (*Handlers) AddMyUserTag

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

AddMyUserTag POST /users/me/tags

func (*Handlers) AddUserGroupAdmin

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

AddUserGroupAdmin POST /groups/:groupID/admins

func (*Handlers) AddUserGroupMember

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

AddUserGroupMember POST /groups/:groupID/members

func (*Handlers) AddUserTag

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

AddUserTag POST /users/:userID/tags

func (*Handlers) ChangeBotIcon

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

ChangeBotIcon PUT /bots/:botID/icon

func (*Handlers) ChangeMyIcon

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

ChangeMyIcon PUT /users/me/icon

func (*Handlers) ChangeStampImage

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

ChangeStampImage PUT /stamps/:stampID/image

func (*Handlers) ChangeUserIcon

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

ChangeUserIcon PUT /users/:userID/icon

func (*Handlers) ChangeUserPassword

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

ChangeUserPassword PUT /users/:userID/password

func (*Handlers) ChangeWebhookIcon

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

ChangeWebhookIcon PUT /webhooks/:webhookID/icon

func (*Handlers) CreateBot

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

CreateBot POST /bots

func (*Handlers) CreateChannels

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

CreateChannels POST /channels

func (*Handlers) CreateClient

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

CreateClient POST /clients

func (*Handlers) CreateClipFolder

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

CreateClipFolder POST /clip-folders

func (*Handlers) CreatePin

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

CreatePin POST /messages/:messageID/pin

func (*Handlers) CreateStamp

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

CreateStamp POST /stamps

func (*Handlers) CreateStampPalette

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

CreateStampPalette POST /stamp-palettes

func (*Handlers) CreateUser

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

CreateUser POST /users

func (*Handlers) CreateWebhook

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

CreateWebhook POST /webhooks

func (*Handlers) DeleteBot

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

DeleteBot DELETE /bots/:botID

func (*Handlers) DeleteClient

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

DeleteClient DELETE /clients/:clientID

func (*Handlers) DeleteClipFolder

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

DeleteClipFolder DELETE /clip-folders/:folderID

func (*Handlers) DeleteClipFolderMessages

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

DeleteClipFolderMessages DELETE /clip-folders/:folderID/messages/:messageID

func (*Handlers) DeleteFile

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

DeleteFile DELETE /files/:fileID

func (*Handlers) DeleteMessage

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

DeleteMessage DELETE /messages/:messageID

func (*Handlers) DeleteStamp

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

DeleteStamp DELETE /stamps/:stampID

func (*Handlers) DeleteStampPalette

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

DeleteStampPalette DELETE /stamp-palette/:paletteID

func (*Handlers) DeleteUserGroup

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

DeleteUserGroup DELETE /groups/:groupID

func (*Handlers) DeleteWebhook

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

DeleteWebhook DELETE /webhooks/:webhookID

func (*Handlers) EditBot

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

EditBot PATCH /bots/:botID

func (*Handlers) EditChannel

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

EditChannel PATCH /channels/:channelID

func (*Handlers) EditChannelSubscribers

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

EditChannelSubscribers PATCH /channels/:channelID/subscribers

func (*Handlers) EditChannelTopic

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

EditChannelTopic PUT /channels/:channelID/topic

func (*Handlers) EditClient

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

EditClient PATCH /clients/:clientID

func (*Handlers) EditClipFolder

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

EditClipFolder PATCH /clip-folders/:folderID

func (*Handlers) EditMe

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

EditMe PATCH /users/me

func (*Handlers) EditMessage

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

EditMessage PUT /messages/:messageID

func (*Handlers) EditMyUserTag

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

EditMyUserTag PATCH /users/me/tags/:tagID

func (*Handlers) EditStamp

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

EditStamp PATCH /stamps/:stampID

func (*Handlers) EditStampPalette

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

EditStampPalette PATCH /stamp-palettes/:paletteID

func (*Handlers) EditUser

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

EditUser PATCH /users/:userID

func (*Handlers) EditUserGroup

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

EditUserGroup PATCH /groups/:groupID

func (*Handlers) EditUserGroupMember

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

EditUserGroupMember POST /groups/:groupID/members/:userID

func (*Handlers) EditUserTag

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

EditUserTag PATCH /users/:userID/tags/:tagID

func (*Handlers) EditWebhook

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

EditWebhook PATCH /webhooks/:webhookID

func (*Handlers) GetActivityTimeline

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

GetActivityTimeline GET /activity/timeline

func (*Handlers) GetBot

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

GetBot GET /bots/:botID

func (*Handlers) GetBotIcon

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

GetBotIcon GET /bots/:botID/icon

func (*Handlers) GetBotLogs

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

GetBotLogs GET /bots/:botID/logs

func (*Handlers) GetBots

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

GetBots GET /bots

func (*Handlers) GetChannel

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

GetChannel GET /channels/:channelID

func (*Handlers) GetChannelBots

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

GetChannelBots GET /channels/:channelID/bots

func (*Handlers) GetChannelEvents

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

GetChannelEvents GET /channels/:channelID/events

func (*Handlers) GetChannelPins

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

GetChannelPins GET /channels/:channelID/pins

func (*Handlers) GetChannelStats

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

GetChannelStats GET /channels/:channelID/stats

func (*Handlers) GetChannelSubscribers

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

GetChannelSubscribers GET /channels/:channelID/subscribers

func (*Handlers) GetChannelTopic

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

GetChannelTopic GET /channels/:channelID/topic

func (*Handlers) GetChannelViewers

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

GetChannelViewers GET /channels/:channelID/viewers

func (*Handlers) GetChannels

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

GetChannels GET /channels

func (*Handlers) GetClient

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

GetClient GET /clients/:clientID

func (*Handlers) GetClients

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

GetClients GET /clients

func (*Handlers) GetClipFolder

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

GetClipFolder GET /clip-folders/:folderID

func (*Handlers) GetClipFolderMessages

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

GetClipFolderMessages GET /clip-folders/:folderID/messages

func (*Handlers) GetClipFolders

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

GetClipFolders GET /clip-folders

func (*Handlers) GetDirectMessages

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

GetDirectMessages GET /users/:userId/messages

func (*Handlers) GetFile

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

GetFile GET /files/:fileID

func (*Handlers) GetFileMeta

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

GetFileMeta GET /files/:fileID/meta

func (*Handlers) GetFiles

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

GetFiles GET /files

func (*Handlers) GetMe

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

GetMe GET /users/me

func (*Handlers) GetMessage

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

GetMessage GET /messages/:messageID

func (*Handlers) GetMessageClips

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

GetMessageClips GET /messages/:messageID/clips

func (*Handlers) GetMessageStamps

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

GetMessageStamps GET /messages/:messageID/stamps

func (*Handlers) GetMessages

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

GetMessages GET /channels/:channelID/messages

func (*Handlers) GetMyChannelSubscriptions

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

GetMyChannelSubscriptions GET /users/me/subscriptions

func (*Handlers) GetMyExternalAccounts

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

GetMyExternalAccounts GET /users/me/ex-accounts

func (*Handlers) GetMyIcon

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

GetMyIcon GET /users/me/icon

func (*Handlers) GetMyNotifyCitation

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

GetMyNotifyCitation GET /user/me/settings/notify-citation

func (*Handlers) GetMyQRCode

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

GetMyQRCode GET /users/me/qr-code

func (*Handlers) GetMySessions

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

GetMySessions GET /users/me/sessions

func (*Handlers) GetMySettings

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

GetMySettings GET /user/me/settings

func (*Handlers) GetMyStampHistory

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

GetMyStampHistory GET /users/me/stamp-history

func (*Handlers) GetMyStars

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

GetMyStars GET /users/me/stars

func (*Handlers) GetMyTokens

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

GetMyTokens GET /users/me/tokens

func (*Handlers) GetMyUnreadChannels

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

GetMyUnreadChannels GET /users/me/unread

func (*Handlers) GetMyUserTags

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

GetMyUserTags GET /users/me/tags

func (*Handlers) GetMyViewStates

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

func (*Handlers) GetOgp

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

GetOgp GET /ogp?url={url}

func (*Handlers) GetOnlineUsers

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

GetOnlineUsers GET /activity/onlines

func (*Handlers) GetPin

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

GetPin GET /messages/:messageID/pin

func (*Handlers) GetPublicUserIcon

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

GetPublicUserIcon GET /public/icon/{username}

func (*Handlers) GetStamp

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

GetStamp GET /stamps/:stampID

func (*Handlers) GetStampImage

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

GetStampImage GET /stamps/:stampID/image

func (*Handlers) GetStampPalette

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

GetStampPalette GET /stamp-palette/:paletteID

func (*Handlers) GetStampPalettes

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

GetStampPalettes GET /stamp-palettes

func (*Handlers) GetStampStats

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

GetStampStats GET /stamps/:stampID/stats

func (*Handlers) GetStamps

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

GetStamps GET /stamps

func (*Handlers) GetTag

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

GetTag GET /tags/:tagID

func (*Handlers) GetThumbnailImage

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

GetThumbnailImage GET /files/:fileID/thumbnail

func (*Handlers) GetUser

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

GetUser GET /users/:userID

func (*Handlers) GetUserDMChannel

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

GetUserDMChannel GET /users/:userID/dm-channel

func (*Handlers) GetUserGroup

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

GetUserGroup GET /groups/:groupID

func (*Handlers) GetUserGroupAdmins

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

GetUserGroupAdmins GET /groups/:groupID/admins

func (*Handlers) GetUserGroupMembers

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

GetUserGroupMembers GET /groups/:groupID/members

func (*Handlers) GetUserGroups

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

GetUserGroups GET /groups

func (*Handlers) GetUserIcon

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

GetUserIcon GET /users/:userID/icon

func (*Handlers) GetUserStats

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

GetUserStats GET /users/me/:userID/stats

func (*Handlers) GetUserTags

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

GetUserTags GET /users/:userID/tags

func (*Handlers) GetUsers

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

GetUsers GET /users

func (*Handlers) GetVersion

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

GetVersion GET /version

func (*Handlers) GetWebRTCState

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

GetWebRTCState GET /webrtc/state

func (*Handlers) GetWebhook

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

GetWebhook GET /webhooks/:webhookID

func (*Handlers) GetWebhookIcon

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

GetWebhookIcon GET /webhooks/:webhookID/icon

func (*Handlers) GetWebhookMessages

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

GetWebhookMessages GET /webhooks/:webhookID/messages

func (*Handlers) GetWebhooks

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

GetWebhooks GET /webhooks

func (*Handlers) InactivateBot

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

InactivateBot POST /bots/:botID/actions/inactivate

func (*Handlers) L

func (h *Handlers) L(c echo.Context) *zap.Logger

L ロガーを返します

func (*Handlers) LetBotJoinChannel

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

LetBotJoinChannel POST /bots/:botID/actions/join

func (*Handlers) LetBotLeaveChannel

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

LetBotLeaveChannel POST /bots/:botID/actions/leave

func (*Handlers) LinkExternalAccount

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

LinkExternalAccount POST /users/me/ex-accounts/link

func (*Handlers) Login

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

Login POST /login

func (*Handlers) Logout

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

Logout POST /logout

func (*Handlers) PostClipFolderMessage

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

PostClipFolderMessage POST /clip-folders/:folderID/messages

func (*Handlers) PostDirectMessage

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

PostDirectMessage POST /users/:userId/messages

func (*Handlers) PostFile

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

PostFile POST /files

func (*Handlers) PostMessage

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

PostMessage POST /channels/:channelID/messages

func (*Handlers) PostMyFCMDevice

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

PostMyFCMDevice POST /users/me/fcm-device

func (*Handlers) PostStar

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

PostStar POST /users/me/stars

func (*Handlers) PostUserGroups

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

PostUserGroups POST /groups

func (*Handlers) PostWebRTCAuthenticate

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

PostWebRTCAuthenticate POST /webrtc/authenticate

func (*Handlers) PostWebhook

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

PostWebhook POST /webhooks/:webhookID

func (*Handlers) PutMyNotifyCitation

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

PutMyNotifyCitation PUT /user/me/settings/notify-citation

func (*Handlers) PutMyPassword

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

PutMyPassword PUT /users/me/password

func (*Handlers) PutUserGroupIcon

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

PutUserGroupIcon PUT /groups/:groupID/icon

func (*Handlers) ReadChannel

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

ReadChannel DELETE /users/me/unread/:channelID

func (*Handlers) ReissueBot

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

ReissueBot POST /bots/:botID/actions/reissue

func (*Handlers) RemoveMessageStamp

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

RemoveMessageStamp DELETE /messages/:messageID/stamps/:stampID

func (*Handlers) RemoveMyStar

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

RemoveMyStar DELETE /users/me/stars/:channelID

func (*Handlers) RemoveMyUserTag

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

RemoveMyUserTag DELETE /users/me/tags/:tagID

func (*Handlers) RemovePin

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

RemovePin DELETE /messages/:messageID/pin

func (*Handlers) RemoveUserGroupAdmin

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

RemoveUserGroupAdmin DELETE /groups/:groupID/admins/:userID

func (*Handlers) RemoveUserGroupMember

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

RemoveUserGroupMember DELETE /groups/:groupID/members/:userID

func (*Handlers) RemoveUserTag

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

RemoveUserTag DELETE /users/:userID/tags/:tagID

func (*Handlers) RevokeMySession

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

RevokeMySession DELETE /users/me/sessions/:referenceID

func (*Handlers) RevokeMyToken

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

RevokeMyToken DELETE /users/me/tokens/:tokenID

func (*Handlers) SearchMessages

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

SearchMessages GET /messages

func (*Handlers) SetChannelSubscribeLevel

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

SetChannelSubscribeLevel PUT /users/me/subscriptions/:channelID

func (*Handlers) SetChannelSubscribers

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

SetChannelSubscribers PUT /channels/:channelID/subscribers

func (*Handlers) Setup

func (h *Handlers) Setup(e *echo.Group)

Setup APIルーティングを行います

func (*Handlers) UnlinkExternalAccount

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

UnlinkExternalAccount POST /users/me/ex-accounts/unlink

type Message

type Message struct {
	ID        uuid.UUID            `json:"id"`
	UserID    uuid.UUID            `json:"userId"`
	ChannelID uuid.UUID            `json:"channelId"`
	Content   string               `json:"content"`
	CreatedAt time.Time            `json:"createdAt"`
	UpdatedAt time.Time            `json:"updatedAt"`
	Pinned    bool                 `json:"pinned"`
	Stamps    []model.MessageStamp `json:"stamps"`
	ThreadID  optional.UUID        `json:"threadId"` // TODO
}

type MessageClip

type MessageClip struct {
	FolderID  uuid.UUID `json:"folderId"`
	ClippedAt time.Time `json:"clippedAt"`
}

type MessagePin

type MessagePin struct {
	UserID   uuid.UUID `json:"userId"`
	PinnedAt time.Time `json:"pinnedAt"`
}

type MessagesQuery

type MessagesQuery struct {
	Limit     int           `query:"limit"`
	Offset    int           `query:"offset"`
	Since     optional.Time `query:"since"`
	Until     optional.Time `query:"until"`
	Inclusive bool          `query:"inclusive"`
	Order     string        `query:"order"`
}

func (*MessagesQuery) Validate

func (q *MessagesQuery) Validate() error

type OAuth2Client

type OAuth2Client struct {
	ID          string             `json:"id"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	DeveloperID uuid.UUID          `json:"developerId"`
	Scopes      model.AccessScopes `json:"scopes"`
}

type OAuth2ClientDetail

type OAuth2ClientDetail struct {
	ID          string             `json:"id"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	DeveloperID uuid.UUID          `json:"developerId"`
	Scopes      model.AccessScopes `json:"scopes"`
	CallbackURL string             `json:"callbackUrl"`
	Secret      string             `json:"secret"`
}

type PatchBotRequest

type PatchBotRequest struct {
	DisplayName     optional.String     `json:"displayName"`
	Description     optional.String     `json:"description"`
	Mode            optional.String     `json:"mode"`
	Endpoint        optional.String     `json:"endpoint"`
	Privileged      optional.Bool       `json:"privileged"`
	DeveloperID     optional.UUID       `json:"developerId"`
	SubscribeEvents model.BotEventTypes `json:"subscribeEvents"`
}

PatchBotRequest PATCH /bots/:botID リクエストボディ

func (PatchBotRequest) ValidateWithContext

func (r PatchBotRequest) ValidateWithContext(ctx context.Context) error

type PatchChannelRequest

type PatchChannelRequest struct {
	Name     optional.String `json:"name"`
	Archived optional.Bool   `json:"archived"`
	Force    optional.Bool   `json:"force"`
	Parent   optional.UUID   `json:"parent"`
}

PatchChannelRequest PATCH /channels/:channelID リクエストボディ

func (PatchChannelRequest) Validate

func (r PatchChannelRequest) Validate() error

type PatchChannelSubscribersRequest

type PatchChannelSubscribersRequest struct {
	On  set.UUID `json:"on"`
	Off set.UUID `json:"off"`
}

PatchChannelSubscribersRequest PATCH /channels/:channelID/subscribers リクエストボディ

type PatchClientRequest

type PatchClientRequest struct {
	Name        optional.String `json:"name"`
	Description optional.String `json:"description"`
	CallbackURL optional.String `json:"callbackUrl"`
	DeveloperID optional.UUID   `json:"developerId"`
}

PatchClientRequest PATCH /clients/:clientID リクエストボディ

func (PatchClientRequest) Validate

func (r PatchClientRequest) Validate() error

type PatchMeRequest

type PatchMeRequest struct {
	DisplayName optional.String `json:"displayName"`
	TwitterID   optional.String `json:"twitterId"`
	Bio         optional.String `json:"bio"`
	HomeChannel optional.UUID   `json:"homeChannel"`
}

PatchMeRequest PATCH /users/me リクエストボディ

func (PatchMeRequest) ValidateWithContext

func (r PatchMeRequest) ValidateWithContext(ctx context.Context) error

type PatchStampPaletteRequest

type PatchStampPaletteRequest struct {
	Name        optional.String `json:"name"`
	Description optional.String `json:"description"`
	Stamps      model.UUIDs     `json:"stamps"`
}

PatchStampPaletteRequest PATCH /stamp-palettes/:paletteID リクエストボディ

func (PatchStampPaletteRequest) Validate

func (r PatchStampPaletteRequest) Validate() error

type PatchStampRequest

type PatchStampRequest struct {
	Name      optional.String `json:"name"`
	CreatorID optional.UUID   `json:"creatorId"`
}

PatchStampRequest PATCH /stamps/:stampID リクエストボディ

func (PatchStampRequest) ValidateWithContext

func (r PatchStampRequest) ValidateWithContext(ctx context.Context) error

type PatchUserGroupMemberRequest

type PatchUserGroupMemberRequest struct {
	Role string `json:"role"`
}

PatchUserGroupMemberRequest PATCH /groups/:groupID/members リクエストボディ

func (PatchUserGroupMemberRequest) Validate

func (r PatchUserGroupMemberRequest) Validate() error

type PatchUserGroupRequest

type PatchUserGroupRequest struct {
	Name        optional.String `json:"name"`
	Description optional.String `json:"description"`
	Type        optional.String `json:"type"`
}

PatchUserGroupRequest PATCH /groups/:groupID リクエストボディ

func (PatchUserGroupRequest) Validate

func (r PatchUserGroupRequest) Validate() error

type PatchUserRequest

type PatchUserRequest struct {
	DisplayName optional.String `json:"displayName"`
	TwitterID   optional.String `json:"twitterId"`
	Role        optional.String `json:"role"`
	State       optional.Int    `json:"state"`
}

PatchUserRequest PATCH /users/:userID リクエストボディ

func (PatchUserRequest) Validate

func (r PatchUserRequest) Validate() error

type PatchUserTagRequest

type PatchUserTagRequest struct {
	IsLocked bool `json:"isLocked"`
}

PatchUserTagRequest PATCH /users/:userID/tags/:tagID リクエストボディ

type PatchWebhookRequest

type PatchWebhookRequest struct {
	Name        optional.String `json:"name"`
	Description optional.String `json:"description"`
	ChannelID   optional.UUID   `json:"channelId"`
	Secret      optional.String `json:"secret"`
	OwnerID     optional.UUID   `json:"ownerId"`
}

PatchWebhookRequest PATCH /webhooks/:webhookID リクエストボディ

func (PatchWebhookRequest) ValidateWithContext

func (r PatchWebhookRequest) ValidateWithContext(ctx context.Context) error

type Pin

type Pin struct {
	UserID   uuid.UUID `json:"userId"`
	PinnedAt time.Time `json:"pinnedAt"`
	Message  *Message  `json:"message"`
}

type PostBotActionJoinRequest

type PostBotActionJoinRequest struct {
	ChannelID uuid.UUID `json:"channelId"`
}

PostBotActionJoinRequest POST /bots/:botID/actions/join リクエストボディ

func (PostBotActionJoinRequest) ValidateWithContext

func (r PostBotActionJoinRequest) ValidateWithContext(ctx context.Context) error

type PostBotActionLeaveRequest

type PostBotActionLeaveRequest struct {
	ChannelID uuid.UUID `json:"channelId"`
}

PostBotActionLeaveRequest POST /bots/:botID/actions/leave リクエストボディ

func (PostBotActionLeaveRequest) Validate

func (r PostBotActionLeaveRequest) Validate() error

type PostBotRequest

type PostBotRequest struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Description string `json:"description"`
	Mode        string `json:"mode"`
	Endpoint    string `json:"endpoint"`
}

PostBotRequest POST /bots リクエストボディ

func (PostBotRequest) Validate

func (r PostBotRequest) Validate() error

type PostChannelRequest

type PostChannelRequest struct {
	Name   string        `json:"name"`
	Parent optional.UUID `json:"parent"`
}

PostChannelRequest POST /channels リクエストボディ

func (PostChannelRequest) Validate

func (r PostChannelRequest) Validate() error

type PostClientsRequest

type PostClientsRequest struct {
	Name        string             `json:"name"`
	Description string             `json:"description"`
	CallbackURL string             `json:"callbackUrl"`
	Scopes      model.AccessScopes `json:"scopes"`
}

PostClientsRequest POST /clients リクエストボディ

func (PostClientsRequest) Validate

func (r PostClientsRequest) Validate() error

type PostClipFolderMessageRequest

type PostClipFolderMessageRequest struct {
	MessageID uuid.UUID
}

type PostClipFolderRequest

type PostClipFolderRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

func (PostClipFolderRequest) Validate

func (r PostClipFolderRequest) Validate() error

type PostLinkExternalAccount

type PostLinkExternalAccount struct {
	ProviderName string `json:"providerName"`
}

PostLinkExternalAccount POST /users/me/ex-accounts/link リクエストボディ

func (PostLinkExternalAccount) Validate

func (r PostLinkExternalAccount) Validate() error

type PostLoginRequest

type PostLoginRequest struct {
	Name     string `json:"name"`
	Password string `json:"password"`
}

PostLoginRequest POST /login リクエストボディ

func (PostLoginRequest) Validate

func (r PostLoginRequest) Validate() error

type PostMessageRequest

type PostMessageRequest struct {
	Content string `json:"content"`
	Embed   bool   `json:"embed" query:"embed"`
}

PostMessageRequest POST /channels/:channelID/messages等リクエストボディ

func (PostMessageRequest) Validate

func (r PostMessageRequest) Validate() error

type PostMessageStampRequest

type PostMessageStampRequest struct {
	Count int `json:"count"`
}

PostMessageStampRequest POST /messages/:messageID/stamps/:stampID リクエストボディ

func (*PostMessageStampRequest) Validate

func (r *PostMessageStampRequest) Validate() error

type PostMyFCMDeviceRequest

type PostMyFCMDeviceRequest struct {
	Token string `json:"token"`
}

PostMyFCMDeviceRequest POST /users/me/fcm-device リクエストボディ

func (PostMyFCMDeviceRequest) Validate

func (r PostMyFCMDeviceRequest) Validate() error

type PostStarRequest

type PostStarRequest struct {
	ChannelID uuid.UUID `json:"channelId"`
}

PostStarRequest POST /users/me/stars リクエストボディ

func (PostStarRequest) ValidateWithContext

func (r PostStarRequest) ValidateWithContext(ctx context.Context) error

type PostUnlinkExternalAccount

type PostUnlinkExternalAccount struct {
	ProviderName string `json:"providerName"`
}

PostUnlinkExternalAccount POST /users/me/ex-accounts/unlink リクエストボディ

func (PostUnlinkExternalAccount) Validate

func (r PostUnlinkExternalAccount) Validate() error

type PostUserGroupAdminRequest

type PostUserGroupAdminRequest struct {
	ID uuid.UUID `json:"id"`
}

PostUserGroupAdminRequest POST /groups/:groupID/admins リクエストボディ

func (PostUserGroupAdminRequest) ValidateWithContext

func (r PostUserGroupAdminRequest) ValidateWithContext(ctx context.Context) error

type PostUserGroupMemberRequest

type PostUserGroupMemberRequest struct {
	ID   uuid.UUID `json:"id"`
	Role string    `json:"role"`
}

PostUserGroupMemberRequest POST /groups/:groupID/members リクエストボディ

func (PostUserGroupMemberRequest) ValidateWithContext

func (r PostUserGroupMemberRequest) ValidateWithContext(ctx context.Context) error

type PostUserGroupRequest

type PostUserGroupRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Type        string `json:"type"`
}

PostUserGroupRequest POST /groups リクエストボディ

func (PostUserGroupRequest) Validate

func (r PostUserGroupRequest) Validate() error

type PostUserRequest

type PostUserRequest struct {
	Name     string          `json:"name"`
	Password optional.String `json:"password"`
}

PostUserRequest POST /users リクエストボディ

func (PostUserRequest) Validate

func (r PostUserRequest) Validate() error

type PostUserTagRequest

type PostUserTagRequest struct {
	Tag string `json:"tag"`
}

PostUserTagRequest POST /users/:userID/tags リクエストボディ

func (PostUserTagRequest) Validate

func (r PostUserTagRequest) Validate() error

type PostWebRTCAuthenticateRequest

type PostWebRTCAuthenticateRequest struct {
	PeerID string `json:"peerId"`
}

PostWebRTCAuthenticateRequest POST /webrtc/authenticate リクエストボディ

func (PostWebRTCAuthenticateRequest) Validate

func (r PostWebRTCAuthenticateRequest) Validate() error

type PostWebhooksRequest

type PostWebhooksRequest struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	ChannelID   uuid.UUID `json:"channelId"`
	Secret      string    `json:"secret"`
}

PostWebhooksRequest POST /webhooks リクエストボディ

func (PostWebhooksRequest) ValidateWithContext

func (r PostWebhooksRequest) ValidateWithContext(ctx context.Context) error

type PutChannelSubscribeLevelRequest

type PutChannelSubscribeLevelRequest struct {
	Level optional.Int `json:"level"`
}

PutChannelSubscribeLevelRequest PUT /users/me/subscriptions/:channelID リクエストボディ

func (PutChannelSubscribeLevelRequest) Validate

type PutChannelSubscribersRequest

type PutChannelSubscribersRequest struct {
	On set.UUID `json:"on"`
}

PutChannelSubscribersRequest PUT /channels/:channelID/subscribers リクエストボディ

type PutChannelTopicRequest

type PutChannelTopicRequest struct {
	Topic string `json:"topic"`
}

PutChannelTopicRequest PUT /channels/:channelID/topic リクエストボディ

func (PutChannelTopicRequest) Validate

func (r PutChannelTopicRequest) Validate() error

type PutMyNotifyCitationRequest

type PutMyNotifyCitationRequest struct {
	NotifyCitation bool `json:"notifyCitation"`
}

PutMyNotifyCitationRequest PUT /user/me/settings/notify-citation リクエストボディ

type PutMyPasswordRequest

type PutMyPasswordRequest struct {
	Password    string `json:"password"`
	NewPassword string `json:"newPassword"`
}

PutMyPasswordRequest PUT /users/me/password リクエストボディ

func (PutMyPasswordRequest) Validate

func (r PutMyPasswordRequest) Validate() error

type PutUserPasswordRequest

type PutUserPasswordRequest struct {
	NewPassword string `json:"newPassword"`
}

PutUserPasswordRequest PUT /users/:userID/password リクエストボディ

func (PutUserPasswordRequest) Validate

func (r PutUserPasswordRequest) Validate() error

type StampPalette

type StampPalette struct {
	ID          uuid.UUID   `json:"id"`
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Stamps      model.UUIDs `json:"stamps"`
	CreatorID   uuid.UUID   `json:"creatorId"`
	CreatedAt   time.Time   `json:"createdAt"`
	UpdatedAt   time.Time   `json:"updatedAt"`
}

type UpdateClipFolderRequest

type UpdateClipFolderRequest struct {
	Name        optional.String `json:"name"`
	Description optional.String `json:"description"`
}

func (UpdateClipFolderRequest) Validate

func (r UpdateClipFolderRequest) Validate() error

type User

type User struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	DisplayName string    `json:"displayName"`
	IconFileID  uuid.UUID `json:"iconFileId"`
	Bot         bool      `json:"bot"`
	State       int       `json:"state"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type UserDetail

type UserDetail struct {
	ID          uuid.UUID     `json:"id"`
	State       int           `json:"state"`
	Bot         bool          `json:"bot"`
	IconFileID  uuid.UUID     `json:"iconFileId"`
	DisplayName string        `json:"displayName"`
	Name        string        `json:"name"`
	TwitterID   string        `json:"twitterId"`
	LastOnline  optional.Time `json:"lastOnline"`
	UpdatedAt   time.Time     `json:"updatedAt"`
	Tags        []UserTag     `json:"tags"`
	Groups      []uuid.UUID   `json:"groups"`
	Bio         string        `json:"bio"`
	HomeChannel optional.UUID `json:"homeChannel"`
}

type UserGroup

type UserGroup struct {
	ID          uuid.UUID         `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Type        string            `json:"type"`
	Icon        uuid.UUID         `json:"icon"`
	Members     []UserGroupMember `json:"members"`
	Admins      []uuid.UUID       `json:"admins"`
	CreatedAt   time.Time         `json:"createdAt"`
	UpdatedAt   time.Time         `json:"updatedAt"`
}

type UserGroupMember

type UserGroupMember struct {
	ID   uuid.UUID `json:"id"`
	Role string    `json:"role"`
}

type UserTag

type UserTag struct {
	ID        uuid.UUID `json:"tagId"`
	Tag       string    `json:"tag"`
	IsLocked  bool      `json:"isLocked"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type Webhook

type Webhook struct {
	WebhookID   string    `json:"id"`
	BotUserID   string    `json:"botUserId"`
	DisplayName string    `json:"displayName"`
	Description string    `json:"description"`
	Secure      bool      `json:"secure"`
	ChannelID   string    `json:"channelId"`
	OwnerID     string    `json:"ownerId"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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