Back to godoc.org

Package v3

v1.0.0-rc.2.0...-82e1559
Latest Go to latest

The highest tagged major version is .

Published: Mar 9, 2020 | License: MIT | Module: github.com/traPtitech/traQ

Index

func NotImplemented

func NotImplemented(c echo.Context) error

NotImplemented 未実装API. 501 NotImplementedを返す

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.BotEvents `json:"subscribeEvents"`
	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.BotEvents `json:"subscribeEvents"`
	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 Channel

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

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"`
	CreatedAt  time.Time          `json:"createdAt"`
	Thumbnail  *FileInfoThumbnail `json:"thumbnail"`
	ChannelID  uuid.NullUUID      `json:"channelId"`
	UploaderID uuid.NullUUID      `json:"uploaderId"`
}

type FileInfoThumbnail

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

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 GetMyStampHistoryRequest

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

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

func (*GetMyStampHistoryRequest) Validate

func (r *GetMyStampHistoryRequest) Validate() error

type Handlers

type Handlers struct {
	RBAC     rbac.RBAC
	Repo     repository.Repository
	WS       *ws.Streamer
	Hub      *hub.Hub
	Logger   *zap.Logger
	Realtime *realtime.Service

	Version  string
	Revision string

	// ImageMagickPath ImageMagickの実行パス
	ImageMagickPath string
	// SkyWaySecretKey SkyWayクレデンシャル用シークレットキー
	SkyWaySecretKey string
}

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) 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) 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) 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) 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) EditChannelTopic

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

EditChannelTopic PUT /channels/:channelID/topic

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) 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) 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) 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) 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) 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) 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) GetMyIcon

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

GetMyIcon GET /users/me/icon

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) 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) 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) 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) 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) 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) 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) 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) 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) 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) PutMyPassword

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

ChangeMyPassword PUT /users/me/password

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) Setup

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

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

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  uuid.NullUUID        `json:"threadId"` // TODO
}

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     null.Time `query:"since"`
	Until     null.Time `query:"until"`
	Inclusive bool      `query:"inclusive"`
	Order     string    `query:"order"`
}

func (*MessagesQuery) Validate

func (q *MessagesQuery) Validate() error

type PatchBotRequest

type PatchBotRequest struct {
	DisplayName     null.String     `json:"displayName"`
	Description     null.String     `json:"description"`
	Endpoint        null.String     `json:"endpoint"`
	Privileged      null.Bool       `json:"privileged"`
	DeveloperID     uuid.NullUUID   `json:"developerId"`
	SubscribeEvents model.BotEvents `json:"subscribeEvents"`
}

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

func (PatchBotRequest) Validate

func (r PatchBotRequest) Validate() error

type PatchChannelRequest

type PatchChannelRequest struct {
	Name       null.String   `json:"name"`
	Visibility null.Bool     `json:"visibility"`
	Force      null.Bool     `json:"force"`
	Parent     uuid.NullUUID `json:"parent"`
}

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

func (PatchChannelRequest) Validate

func (r PatchChannelRequest) Validate() error

type PatchMeRequest

type PatchMeRequest struct {
	DisplayName null.String `json:"displayName"`
	TwitterID   null.String `json:"twitterId"`
	Bio         null.String `json:"bio"`
}

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

func (PatchMeRequest) Validate

func (r PatchMeRequest) Validate() error

type PatchStampRequest

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

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

func (PatchStampRequest) Validate

func (r PatchStampRequest) Validate() 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        null.String `json:"name"`
	Description null.String `json:"description"`
	Type        null.String `json:"type"`
}

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

func (PatchUserGroupRequest) Validate

func (r PatchUserGroupRequest) Validate() error

type PatchUserRequest

type PatchUserRequest struct {
	DisplayName null.String `json:"displayName"`
	TwitterID   null.String `json:"twitterId"`
	Role        null.String `json:"role"`
	State       null.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        null.String   `json:"name"`
	Description null.String   `json:"description"`
	ChannelID   uuid.NullUUID `json:"channelId"`
	Secret      null.String   `json:"secret"`
	OwnerID     uuid.NullUUID `json:"ownerId"`
}

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

func (PatchWebhookRequest) Validate

func (r PatchWebhookRequest) Validate() 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) Validate

func (r PostBotActionJoinRequest) Validate() 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"`
	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 uuid.NullUUID `json:"parent"`
}

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

func (PostChannelRequest) Validate

func (r PostChannelRequest) 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) Validate

func (r PostStarRequest) Validate() error

type PostUserGroupAdminRequest

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

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

func (PostUserGroupAdminRequest) Validate

func (r PostUserGroupAdminRequest) Validate() error

type PostUserGroupMemberRequest

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

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

func (PostUserGroupMemberRequest) Validate

func (r PostUserGroupMemberRequest) Validate() 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 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) Validate

func (r PostWebhooksRequest) Validate() error

type PutChannelTopicRequest

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

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

func (PutChannelTopicRequest) Validate

func (r PutChannelTopicRequest) Validate() error

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 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  *time.Time  `json:"lastOnline"`
	UpdatedAt   time.Time   `json:"updatedAt"`
	Tags        []UserTag   `json:"tags"`
	Groups      []uuid.UUID `json:"groups"`
	Bio         string      `json:"bio"`
}

type UserGroup

type UserGroup struct {
	ID          uuid.UUID         `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Type        string            `json:"type"`
	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"`
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier