gen

package
v0.0.0-...-7674232 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeJSONResponse

func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error

EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code

func Logger

func Logger(inner http.Handler, name string) http.Handler

Logger returns access log logger

func NewRouter

func NewRouter(routers ...Router) *mux.Router

NewRouter creates a new router for any number of api routers

func ReadFormFileToTempFile

func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error)

ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file

func ReadFormFilesToTempFiles

func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error)

ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files

Types

type AccountStruct

type AccountStruct struct {
	Access AccountStructAccess `json:"access,omitempty"`

	// ユーザーID
	AccountID int32 `json:"accountID,omitempty"`

	// APIキー
	ApiKey string `json:"apiKey,omitempty"`

	// 長期間有効トークン検証用シーケンス
	ApiSeq int32 `json:"apiSeq,omitempty"`

	// 他のユーザーに表示されるユーザー説明文/投稿者説明
	Description string `json:"description,omitempty"`

	// (Twitterのような)表示IDを指定します。ここで指定したIDがログインに使用されます。英数字のみ入力できます。
	DisplayID string `json:"displayID,omitempty"`

	// ユーザーの推しキャラ(タグID)を選択します
	Favorite int32 `json:"favorite,omitempty"`

	Invite AccountStructInvite `json:"invite,omitempty"`

	Inviter LightAccountStruct `json:"inviter,omitempty"`

	Ipfs AccountStructIpfs `json:"ipfs,omitempty"`

	// ユーザーのメールアドレス(連絡用)
	Mail string `json:"mail,omitempty"`

	// 他のユーザーに表示されるユーザー名/投稿者名
	Name string `json:"name,omitempty"`

	Notify AccountStructNotify `json:"notify,omitempty"`

	// 現時点のパスワードを入力します。 userPasswordを変更する場合に必要となります。
	OldPassword string `json:"oldPassword,omitempty"`

	// 新しいパスワードを入力します
	Password string `json:"password,omitempty"`

	// 権限レベル 0:普通 5:Modelator 9:SysOp
	Permission int32 `json:"permission,omitempty"`

	// TOTPが有効かが入ります
	TotpEnabled bool `json:"totpEnabled,omitempty"`
}

AccountStruct - アカウントの取得/編集に使う構造体

type AccountStructAccess

type AccountStructAccess struct {

	// 投稿を承認できるか
	CanApprovePost bool `json:"canApprovePost,omitempty"`

	// コメントできるか
	CanComment bool `json:"canComment,omitempty"`

	// 投稿できるか
	CanCreatePost bool `json:"canCreatePost,omitempty"`

	// 投稿を編集できるか
	CanEditPost bool `json:"canEditPost,omitempty"`

	// 招待できるか
	CanInvite bool `json:"canInvite,omitempty"`

	// いいねできるか
	CanLike bool `json:"canLike,omitempty"`
}

AccountStructAccess - 管理者権限とは別の細かな権限

type AccountStructInvite

type AccountStructInvite struct {

	// 招待コード(shortuuid)
	Code string `json:"code,omitempty"`

	// 招待通し番号
	InviteID int32 `json:"inviteID,omitempty"`

	// 招待した人数の累計(誰を招待したかは表示されない)
	InvitedCount int32 `json:"invitedCount,omitempty"`
}

AccountStructInvite - 招待情報

type AccountStructIpfs

type AccountStructIpfs struct {

	// IPFSゲートウェイを使用するか否か
	GatewayEnabled bool `json:"gatewayEnabled,omitempty"`

	// 使用する任意のゲートウェイアドレス
	GatewayUrl string `json:"gatewayUrl,omitempty"`

	// IPFSノードを使用するか否か
	NodeEnabled bool `json:"nodeEnabled,omitempty"`

	// 使用する任意のノードアドレス
	NodeUrl string `json:"nodeUrl,omitempty"`

	// マイリストを自動Pinningするか
	PinEnabled bool `json:"pinEnabled,omitempty"`
}

AccountStructIpfs - IPFS設定

type AccountStructNotify

type AccountStructNotify struct {
	HasLineNotify bool `json:"hasLineNotify,omitempty"`

	HasWebNotify bool `json:"hasWebNotify,omitempty"`
}

AccountStructNotify - 通知クライアントを設定済みか

type AccountsApiController

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

A AccountsApiController binds http requests to an api service and writes the service results to the http response

func (*AccountsApiController) CreateAccount

func (c *AccountsApiController) CreateAccount(w http.ResponseWriter, r *http.Request)

CreateAccount - Create account

func (*AccountsApiController) DeleteAccount

func (c *AccountsApiController) DeleteAccount(w http.ResponseWriter, r *http.Request)

DeleteAccount - Delete account info

func (*AccountsApiController) EditAccount

func (c *AccountsApiController) EditAccount(w http.ResponseWriter, r *http.Request)

EditAccount - Edit account info

func (*AccountsApiController) GetAccount

func (c *AccountsApiController) GetAccount(w http.ResponseWriter, r *http.Request)

GetAccount - Get account info

func (*AccountsApiController) GetAccountMe

func (c *AccountsApiController) GetAccountMe(w http.ResponseWriter, r *http.Request)

GetAccountMe - Get user info (self)

func (*AccountsApiController) GetUploadHistory

func (c *AccountsApiController) GetUploadHistory(w http.ResponseWriter, r *http.Request)

GetUploadHistory - Get upload history

func (*AccountsApiController) LoginWithForm

func (c *AccountsApiController) LoginWithForm(w http.ResponseWriter, r *http.Request)

LoginWithForm - Login with form

func (*AccountsApiController) ReissuePassword

func (c *AccountsApiController) ReissuePassword(w http.ResponseWriter, r *http.Request)

ReissuePassword - Reset password

func (*AccountsApiController) Routes

func (c *AccountsApiController) Routes() Routes

Routes returns all of the api route for the AccountsApiController

type AccountsApiRouter

type AccountsApiRouter interface {
	CreateAccount(http.ResponseWriter, *http.Request)
	DeleteAccount(http.ResponseWriter, *http.Request)
	EditAccount(http.ResponseWriter, *http.Request)
	GetAccount(http.ResponseWriter, *http.Request)
	GetAccountMe(http.ResponseWriter, *http.Request)
	GetUploadHistory(http.ResponseWriter, *http.Request)
	LoginWithForm(http.ResponseWriter, *http.Request)
	ReissuePassword(http.ResponseWriter, *http.Request)
}

AccountsApiRouter defines the required methods for binding the api requests to a responses for the AccountsApi The AccountsApiRouter implementation should parse necessary information from the http request, pass the data to a AccountsApiServicer to perform the required actions, then write the service results to the http response.

type AccountsApiService

type AccountsApiService struct {
}

AccountsApiService is a service that implents the logic for the AccountsApiServicer This service should implement the business logic for every endpoint for the AccountsApi API. Include any external packages or services that will be required by this service.

func (*AccountsApiService) CreateAccount

func (s *AccountsApiService) CreateAccount(ctx context.Context, accountStruct AccountStruct) (ImplResponse, error)

CreateAccount - Create account

func (*AccountsApiService) DeleteAccount

func (s *AccountsApiService) DeleteAccount(ctx context.Context, accountID int32, password string) (ImplResponse, error)

DeleteAccount - Delete account info

func (*AccountsApiService) EditAccount

func (s *AccountsApiService) EditAccount(ctx context.Context, accountID int32, accountStruct AccountStruct) (ImplResponse, error)

EditAccount - Edit account info

func (*AccountsApiService) GetAccount

func (s *AccountsApiService) GetAccount(ctx context.Context, accountID int32) (ImplResponse, error)

GetAccount - Get account info

func (*AccountsApiService) GetAccountMe

func (s *AccountsApiService) GetAccountMe(ctx context.Context) (ImplResponse, error)

GetAccountMe - Get user info (self)

func (*AccountsApiService) GetUploadHistory

func (s *AccountsApiService) GetUploadHistory(ctx context.Context, accountID int32, page int32, sort string, order string, perPage int32) (ImplResponse, error)

GetUploadHistory - Get upload history

func (*AccountsApiService) LoginWithForm

func (s *AccountsApiService) LoginWithForm(ctx context.Context, postLoginWithFormRequest PostLoginWithFormRequest) (ImplResponse, error)

LoginWithForm - Login with form

func (*AccountsApiService) ReissuePassword

func (s *AccountsApiService) ReissuePassword(ctx context.Context, postResetPasswordRequest PostResetPasswordRequest) (ImplResponse, error)

ReissuePassword - Reset password

type AccountsApiServicer

AccountsApiServicer defines the api actions for the AccountsApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

func NewAccountsApiService

func NewAccountsApiService() AccountsApiServicer

NewAccountsApiService creates a default api service

type GeneralMessageResponse

type GeneralMessageResponse struct {

	// 応答メッセージ(何が間違っているかの詳細)
	Message string `json:"message"`
}

GeneralMessageResponse - 共通の応答構造体(404/401/400等を返す際に使用)

type GetMutesResponse

type GetMutesResponse struct {

	// ミュート中の絵師ID配列
	Artists []MuteStruct `json:"artists"`

	// ミュート中のタグID配列
	Tags []MuteStruct `json:"tags"`
}

GetMutesResponse - ミュート情報一覧の応答構造体

type GetMylistListResponse

type GetMylistListResponse struct {
	Contents []MylistStruct `json:"contents"`

	Pagination PaginationStruct `json:"pagination"`
}

GetMylistListResponse - マイリスト情報一覧の応答構造体

type GetNotifyClientsResponse

type GetNotifyClientsResponse struct {
	Clients []NotifyClientStruct `json:"clients,omitempty"`
}

GetNotifyClientsResponse - 通知クライアント情報一覧の応答構造体

type GetNotifyConditionsResponse

type GetNotifyConditionsResponse struct {
	Conditions []NotifyConditionStruct `json:"conditions,omitempty"`

	Pagination PaginationStruct `json:"pagination,omitempty"`
}

GetNotifyConditionsResponse - 通知条件情報一覧の応答構造体

type GetTimelineFollowingResponse

type GetTimelineFollowingResponse struct {
	Follows []LightArtistStruct `json:"follows,omitempty"`

	Pagination PaginationStruct `json:"pagination,omitempty"`
}

GetTimelineFollowingResponse - タイムラインのフォロー一覧の応答構造体

type GetUploadHistoryResponse

type GetUploadHistoryResponse struct {

	// 指定された範囲で一致するデータ 一致するものがなければ空配列
	Contents []UploadHistoryStruct `json:"contents,omitempty"`

	Pagination PaginationStruct `json:"pagination,omitempty"`
}

GetUploadHistoryResponse - 投稿履歴情報一覧の応答構造体

type ImplResponse

type ImplResponse struct {
	Code int
	Body interface{}
}

ImplResponse defines an error code with the associated body

func Response

func Response(code int, body interface{}) ImplResponse

Response return a ImplResponse struct filled

type LightAccountStruct

type LightAccountStruct struct {

	// アカウントID
	AccountID int32 `json:"accountID,omitempty"`

	// アカウント名
	Name string `json:"name,omitempty"`
}

LightAccountStruct - アカウント情報の簡易構造体(読み取り専用)

type LightArtStruct

type LightArtStruct struct {

	// イラストID
	ArtID int32 `json:"artID,omitempty"`

	// 絵師情報(複数可)
	Artists []LightArtistStruct `json:"artists,omitempty"`

	// 説明文 NOTE: 通常出典記載の説明文と同じ物が入る
	Caption string `json:"caption,omitempty"`

	// 登録日(%Y-%m-%d %H:%M:%S)
	Datetime time.Time `json:"datetime,omitempty"`

	File LightArtStructFile `json:"file,omitempty"`

	// 累計いいね数
	Likes int64 `json:"likes,omitempty"`

	// リクエストしたユーザーがマイリストしているか
	Mylisted bool `json:"mylisted,omitempty"`

	// マイリスト済みのユーザー数
	Mylists int64 `json:"mylists,omitempty"`

	// アダルトコンテンツか否か
	Nsfw bool `json:"nsfw,omitempty"`

	// 出典のサービス名
	OriginService string `json:"originService,omitempty"`

	// 出典URL
	OriginUrl string `json:"originUrl,omitempty"`

	// グループになっている場合のページ番号
	Page int32 `json:"page,omitempty"`

	// 元画像との類似度(画像検索のみ)
	Similarity float32 `json:"similarity,omitempty"`

	// イラスト(作品)名
	Title string `json:"title,omitempty"`

	Uploader LightAccountStruct `json:"uploader,omitempty"`

	// 累計閲覧数
	Views int64 `json:"views,omitempty"`
}

LightArtStruct - イラスト情報の簡易構造体(読み取り専用)(検索結果等で利用)

type LightArtStructFile

type LightArtStructFile struct {
	IpfsHash LightArtStructFileIpfsHash `json:"ipfsHash,omitempty"`
}

type LightArtStructFileIpfsHash

type LightArtStructFileIpfsHash struct {

	// Raw画像ハッシュ
	Orig string `json:"orig,omitempty"`

	// サムネイルハッシュ
	Thumb string `json:"thumb,omitempty"`
}

LightArtStructFileIpfsHash - IPFSのハッシュ情報

type LightArtistStruct

type LightArtistStruct struct {
	ArtistID int32 `json:"artistID,omitempty"`

	Name string `json:"name,omitempty"`
}

LightArtistStruct - 絵師情報の簡易構造体(読み取り専用)

type MuteStruct

type MuteStruct struct {

	// 情報作成者のアカウントID
	AccountID int32 `json:"accountID,omitempty"`

	// ミュートID
	MuteID int32 `json:"muteID,omitempty"`

	// 対象のタグ/絵師ID
	TargetID int32 `json:"targetID,omitempty"`

	// ミュート種別
	TargetType string `json:"targetType,omitempty"`
}

MuteStruct - ミュート情報の構造体

type MutesApiController

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

A MutesApiController binds http requests to an api service and writes the service results to the http response

func (*MutesApiController) AddMute

AddMute - Add mute

func (*MutesApiController) DeleteMute

func (c *MutesApiController) DeleteMute(w http.ResponseWriter, r *http.Request)

DeleteMute - Delete mute

func (*MutesApiController) GetMute

GetMute - Get mute

func (*MutesApiController) GetMutes

func (c *MutesApiController) GetMutes(w http.ResponseWriter, r *http.Request)

GetMutes - Get mute list

func (*MutesApiController) Routes

func (c *MutesApiController) Routes() Routes

Routes returns all of the api route for the MutesApiController

type MutesApiRouter

type MutesApiRouter interface {
	AddMute(http.ResponseWriter, *http.Request)
	DeleteMute(http.ResponseWriter, *http.Request)
	GetMute(http.ResponseWriter, *http.Request)
	GetMutes(http.ResponseWriter, *http.Request)
}

MutesApiRouter defines the required methods for binding the api requests to a responses for the MutesApi The MutesApiRouter implementation should parse necessary information from the http request, pass the data to a MutesApiServicer to perform the required actions, then write the service results to the http response.

type MutesApiService

type MutesApiService struct {
}

MutesApiService is a service that implents the logic for the MutesApiServicer This service should implement the business logic for every endpoint for the MutesApi API. Include any external packages or services that will be required by this service.

func (*MutesApiService) AddMute

func (s *MutesApiService) AddMute(ctx context.Context, accountID int32, muteStruct MuteStruct) (ImplResponse, error)

AddMute - Add mute

func (*MutesApiService) DeleteMute

func (s *MutesApiService) DeleteMute(ctx context.Context, accountID int32, muteID int32) (ImplResponse, error)

DeleteMute - Delete mute

func (*MutesApiService) GetMute

func (s *MutesApiService) GetMute(ctx context.Context, accountID int32, muteID int32) (ImplResponse, error)

GetMute - Get mute

func (*MutesApiService) GetMutes

func (s *MutesApiService) GetMutes(ctx context.Context, accountID int32) (ImplResponse, error)

GetMutes - Get mute list

type MutesApiServicer

type MutesApiServicer interface {
	AddMute(context.Context, int32, MuteStruct) (ImplResponse, error)
	DeleteMute(context.Context, int32, int32) (ImplResponse, error)
	GetMute(context.Context, int32, int32) (ImplResponse, error)
	GetMutes(context.Context, int32) (ImplResponse, error)
}

MutesApiServicer defines the api actions for the MutesApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

func NewMutesApiService

func NewMutesApiService() MutesApiServicer

NewMutesApiService creates a default api service

type MylistApiController

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

A MylistApiController binds http requests to an api service and writes the service results to the http response

func (*MylistApiController) CreateMylist

func (c *MylistApiController) CreateMylist(w http.ResponseWriter, r *http.Request)

CreateMylist - Create user mylist

func (*MylistApiController) GetUserMylists

func (c *MylistApiController) GetUserMylists(w http.ResponseWriter, r *http.Request)

GetUserMylists - Get user mylists

func (*MylistApiController) Routes

func (c *MylistApiController) Routes() Routes

Routes returns all of the api route for the MylistApiController

type MylistApiRouter

type MylistApiRouter interface {
	CreateMylist(http.ResponseWriter, *http.Request)
	GetUserMylists(http.ResponseWriter, *http.Request)
}

MylistApiRouter defines the required methods for binding the api requests to a responses for the MylistApi The MylistApiRouter implementation should parse necessary information from the http request, pass the data to a MylistApiServicer to perform the required actions, then write the service results to the http response.

type MylistApiService

type MylistApiService struct {
}

MylistApiService is a service that implents the logic for the MylistApiServicer This service should implement the business logic for every endpoint for the MylistApi API. Include any external packages or services that will be required by this service.

func (*MylistApiService) CreateMylist

func (s *MylistApiService) CreateMylist(ctx context.Context, accountID int32, mylistStruct MylistStruct) (ImplResponse, error)

CreateMylist - Create user mylist

func (*MylistApiService) GetUserMylists

func (s *MylistApiService) GetUserMylists(ctx context.Context, accountID int32) (ImplResponse, error)

GetUserMylists - Get user mylists

type MylistApiServicer

type MylistApiServicer interface {
	CreateMylist(context.Context, int32, MylistStruct) (ImplResponse, error)
	GetUserMylists(context.Context, int32) (ImplResponse, error)
}

MylistApiServicer defines the api actions for the MylistApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

func NewMylistApiService

func NewMylistApiService() MylistApiServicer

NewMylistApiService creates a default api service

type MylistStruct

type MylistStruct struct {

	// イラストID一覧
	Arts []LightArtStruct `json:"arts,omitempty"`

	// マイリスト作成日時
	CreatedDate time.Time `json:"createdDate,omitempty"`

	// マイリスト説明文
	Description string `json:"description,omitempty"`

	// マイリストID
	MylistID int32 `json:"mylistID,omitempty"`

	// マイリスト名
	Name string `json:"name,omitempty"`

	Owner LightAccountStruct `json:"owner,omitempty"`

	// 公開/非公開
	Private bool `json:"private,omitempty"`

	// マイリスト更新日時
	UpdatedDate time.Time `json:"updatedDate,omitempty"`
}

MylistStruct - マイリスト情報の構造体

type NotifyApiController

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

A NotifyApiController binds http requests to an api service and writes the service results to the http response

func (*NotifyApiController) AddLineNotifyClient

func (c *NotifyApiController) AddLineNotifyClient(w http.ResponseWriter, r *http.Request)

AddLineNotifyClient - Create line notify client

func (*NotifyApiController) AddWebNotifyClient

func (c *NotifyApiController) AddWebNotifyClient(w http.ResponseWriter, r *http.Request)

AddWebNotifyClient - Create webpush notify client

func (*NotifyApiController) DeleteNotifyClient

func (c *NotifyApiController) DeleteNotifyClient(w http.ResponseWriter, r *http.Request)

DeleteNotifyClient - Delete notify client

func (*NotifyApiController) DeleteNotifyCondition

func (c *NotifyApiController) DeleteNotifyCondition(w http.ResponseWriter, r *http.Request)

DeleteNotifyCondition - Delete notify condition

func (*NotifyApiController) EditNotifyClient

func (c *NotifyApiController) EditNotifyClient(w http.ResponseWriter, r *http.Request)

EditNotifyClient - Edit notify client

func (*NotifyApiController) EditNotifyCondition

func (c *NotifyApiController) EditNotifyCondition(w http.ResponseWriter, r *http.Request)

EditNotifyCondition - Edit notify condition

func (*NotifyApiController) GetNotifyClient

func (c *NotifyApiController) GetNotifyClient(w http.ResponseWriter, r *http.Request)

GetNotifyClient - Get notify client

func (*NotifyApiController) GetNotifyClients

func (c *NotifyApiController) GetNotifyClients(w http.ResponseWriter, r *http.Request)

GetNotifyClients - Get notify clients

func (*NotifyApiController) GetNotifyCondition

func (c *NotifyApiController) GetNotifyCondition(w http.ResponseWriter, r *http.Request)

GetNotifyCondition - Get notify condition

func (*NotifyApiController) GetNotifyConditions

func (c *NotifyApiController) GetNotifyConditions(w http.ResponseWriter, r *http.Request)

GetNotifyConditions - Get notify conditions

func (*NotifyApiController) RegisterNotifyCondition

func (c *NotifyApiController) RegisterNotifyCondition(w http.ResponseWriter, r *http.Request)

RegisterNotifyCondition - Register notify condition

func (*NotifyApiController) Routes

func (c *NotifyApiController) Routes() Routes

Routes returns all of the api route for the NotifyApiController

type NotifyApiRouter

type NotifyApiRouter interface {
	AddLineNotifyClient(http.ResponseWriter, *http.Request)
	AddWebNotifyClient(http.ResponseWriter, *http.Request)
	DeleteNotifyClient(http.ResponseWriter, *http.Request)
	DeleteNotifyCondition(http.ResponseWriter, *http.Request)
	EditNotifyClient(http.ResponseWriter, *http.Request)
	EditNotifyCondition(http.ResponseWriter, *http.Request)
	GetNotifyClient(http.ResponseWriter, *http.Request)
	GetNotifyClients(http.ResponseWriter, *http.Request)
	GetNotifyCondition(http.ResponseWriter, *http.Request)
	GetNotifyConditions(http.ResponseWriter, *http.Request)
	RegisterNotifyCondition(http.ResponseWriter, *http.Request)
}

NotifyApiRouter defines the required methods for binding the api requests to a responses for the NotifyApi The NotifyApiRouter implementation should parse necessary information from the http request, pass the data to a NotifyApiServicer to perform the required actions, then write the service results to the http response.

type NotifyApiService

type NotifyApiService struct {
}

NotifyApiService is a service that implents the logic for the NotifyApiServicer This service should implement the business logic for every endpoint for the NotifyApi API. Include any external packages or services that will be required by this service.

func (*NotifyApiService) AddLineNotifyClient

func (s *NotifyApiService) AddLineNotifyClient(ctx context.Context, accountID int32, postRegisterLineNotifyRequest PostRegisterLineNotifyRequest) (ImplResponse, error)

AddLineNotifyClient - Create line notify client

func (*NotifyApiService) AddWebNotifyClient

func (s *NotifyApiService) AddWebNotifyClient(ctx context.Context, accountID int32, postRegisterWebPushRequest PostRegisterWebPushRequest) (ImplResponse, error)

AddWebNotifyClient - Create webpush notify client

func (*NotifyApiService) DeleteNotifyClient

func (s *NotifyApiService) DeleteNotifyClient(ctx context.Context, accountID int32, notifyClientID int32) (ImplResponse, error)

DeleteNotifyClient - Delete notify client

func (*NotifyApiService) DeleteNotifyCondition

func (s *NotifyApiService) DeleteNotifyCondition(ctx context.Context, conditionID int32, accountID int32) (ImplResponse, error)

DeleteNotifyCondition - Delete notify condition

func (*NotifyApiService) EditNotifyClient

func (s *NotifyApiService) EditNotifyClient(ctx context.Context, accountID int32, notifyClientID int32, notifyClientStruct NotifyClientStruct) (ImplResponse, error)

EditNotifyClient - Edit notify client

func (*NotifyApiService) EditNotifyCondition

func (s *NotifyApiService) EditNotifyCondition(ctx context.Context, conditionID int32, accountID int32, notifyConditionStruct NotifyConditionStruct) (ImplResponse, error)

EditNotifyCondition - Edit notify condition

func (*NotifyApiService) GetNotifyClient

func (s *NotifyApiService) GetNotifyClient(ctx context.Context, accountID int32, notifyClientID int32) (ImplResponse, error)

GetNotifyClient - Get notify client

func (*NotifyApiService) GetNotifyClients

func (s *NotifyApiService) GetNotifyClients(ctx context.Context, accountID int32) (ImplResponse, error)

GetNotifyClients - Get notify clients

func (*NotifyApiService) GetNotifyCondition

func (s *NotifyApiService) GetNotifyCondition(ctx context.Context, conditionID int32, accountID int32) (ImplResponse, error)

GetNotifyCondition - Get notify condition

func (*NotifyApiService) GetNotifyConditions

func (s *NotifyApiService) GetNotifyConditions(ctx context.Context, accountID int32, type_ string) (ImplResponse, error)

GetNotifyConditions - Get notify conditions

func (*NotifyApiService) RegisterNotifyCondition

func (s *NotifyApiService) RegisterNotifyCondition(ctx context.Context, accountID int32, notifyConditionStruct NotifyConditionStruct) (ImplResponse, error)

RegisterNotifyCondition - Register notify condition

type NotifyApiServicer

type NotifyApiServicer interface {
	AddLineNotifyClient(context.Context, int32, PostRegisterLineNotifyRequest) (ImplResponse, error)
	AddWebNotifyClient(context.Context, int32, PostRegisterWebPushRequest) (ImplResponse, error)
	DeleteNotifyClient(context.Context, int32, int32) (ImplResponse, error)
	DeleteNotifyCondition(context.Context, int32, int32) (ImplResponse, error)
	EditNotifyClient(context.Context, int32, int32, NotifyClientStruct) (ImplResponse, error)
	EditNotifyCondition(context.Context, int32, int32, NotifyConditionStruct) (ImplResponse, error)
	GetNotifyClient(context.Context, int32, int32) (ImplResponse, error)
	GetNotifyClients(context.Context, int32) (ImplResponse, error)
	GetNotifyCondition(context.Context, int32, int32) (ImplResponse, error)
	GetNotifyConditions(context.Context, int32, string) (ImplResponse, error)
	RegisterNotifyCondition(context.Context, int32, NotifyConditionStruct) (ImplResponse, error)
}

NotifyApiServicer defines the api actions for the NotifyApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

func NewNotifyApiService

func NewNotifyApiService() NotifyApiServicer

NewNotifyApiService creates a default api service

type NotifyClientStruct

type NotifyClientStruct struct {

	// 情報作成者のアカウントID
	AccountID int32 `json:"accountID,omitempty"`

	// 通知レベル 1:緊急時のみ 5:タグ絵師通知のみ 9:すべて
	Level int32 `json:"level,omitempty"`

	// ユーザーが指定した通知クライアント名
	Name string `json:"name,omitempty"`

	// 通知クライアントID
	NotifyClientID int32 `json:"notifyClientID,omitempty"`

	// クライアント種別
	Type string `json:"type,omitempty"`
}

NotifyClientStruct - 通知クライアント情報の構造体

type NotifyConditionStruct

type NotifyConditionStruct struct {

	// 情報作成者のアカウントID
	AccountID int32 `json:"accountID,omitempty"`

	// NotifyConditionID
	NotifyConditionID int32 `json:"notifyConditionID,omitempty"`

	// 対象の通知クライアント(ターゲットが全てなら-1)
	TargetClient int32 `json:"targetClient,omitempty"`

	// 条件ID 全通知なら0/タグID/絵師ID
	TargetID int32 `json:"targetID,omitempty"`

	// 通知方法
	TargetMethod string `json:"targetMethod,omitempty"`

	// 条件種別
	TargetType string `json:"targetType,omitempty"`
}

NotifyConditionStruct - 通知条件情報の構造体

type PaginationStruct

type PaginationStruct struct {

	// ヒット総数
	Count int32 `json:"count"`

	// 現在のページ
	Current int32 `json:"current"`

	// ページ数
	Pages int32 `json:"pages"`

	// ページ毎の取得数
	PerPage int32 `json:"perPage"`

	// ページネーションタイトル(表示用)
	Title string `json:"title"`

	// ページネーション種別(表示用)
	Type string `json:"type"`
}

PaginationStruct - ページネーション情報の構造体

type PostLoginWithFormRequest

type PostLoginWithFormRequest struct {

	// ログインID
	Id string `json:"id"`

	// ログインパスワード
	Password string `json:"password"`

	// ログインTOTPトークン
	TotpCode string `json:"totpCode,omitempty"`
}

PostLoginWithFormRequest - ログインする際に利用される要求構造体

type PostLoginWithFormResponse

type PostLoginWithFormResponse struct {
	ApiKey string `json:"apiKey,omitempty"`
}

PostLoginWithFormResponse - ログインに成功した際に利用される応答構造体

type PostRegisterLineNotifyRequest

type PostRegisterLineNotifyRequest struct {

	// 通知レベル 1:緊急時のみ 5:タグ絵師通知のみ 9:すべて
	Level int32 `json:"level"`

	// 通知クライアント名
	Name string `json:"name"`

	// LineNotifyのパーソナルトークン
	Token string `json:"token"`
}

PostRegisterLineNotifyRequest - LineNotifyのトークンを登録する際の要求構造体

type PostRegisterWebPushRequest

type PostRegisterWebPushRequest struct {

	// WebPushの通知送信認証キー
	Auth string `json:"auth"`

	// WebPushのPOST先エンドポイント(ユーザー毎に異なる)
	Endpoint string `json:"endpoint"`

	// 通知レベル 1:緊急時のみ 5:タグ絵師通知のみ 9:すべて
	Level int32 `json:"level"`

	// 通知クライアント名
	Name string `json:"name"`

	// ブラウザ公開鍵
	P256dh string `json:"p256dh"`
}

PostRegisterWebPushRequest - WebPushのトークンを登録する際の要求構造体

type PostResetPasswordRequest

type PostResetPasswordRequest struct {

	// メールアドレス(のみ)
	Mail string `json:"mail,omitempty"`
}

PostResetPasswordRequest - パスワードをリセットする際に使う要求構造体

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

A Route defines the parameters for an api endpoint

type Router

type Router interface {
	Routes() Routes
}

Router defines the required methods for retrieving api routes

func NewAccountsApiController

func NewAccountsApiController(s AccountsApiServicer) Router

NewAccountsApiController creates a default api controller

func NewMutesApiController

func NewMutesApiController(s MutesApiServicer) Router

NewMutesApiController creates a default api controller

func NewMylistApiController

func NewMylistApiController(s MylistApiServicer) Router

NewMylistApiController creates a default api controller

func NewNotifyApiController

func NewNotifyApiController(s NotifyApiServicer) Router

NewNotifyApiController creates a default api controller

func NewTimelineApiController

func NewTimelineApiController(s TimelineApiServicer) Router

NewTimelineApiController creates a default api controller

type Routes

type Routes []Route

Routes are a collection of defined api endpoints

type TimelineApiController

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

A TimelineApiController binds http requests to an api service and writes the service results to the http response

func (*TimelineApiController) FollowArtist

func (c *TimelineApiController) FollowArtist(w http.ResponseWriter, r *http.Request)

FollowArtist - Follow artist

func (*TimelineApiController) GetFollowingArtists

func (c *TimelineApiController) GetFollowingArtists(w http.ResponseWriter, r *http.Request)

GetFollowingArtists - Get timeline followings

func (*TimelineApiController) Routes

func (c *TimelineApiController) Routes() Routes

Routes returns all of the api route for the TimelineApiController

func (*TimelineApiController) UnfollowArtist

func (c *TimelineApiController) UnfollowArtist(w http.ResponseWriter, r *http.Request)

UnfollowArtist - Unfollow artist

type TimelineApiRouter

type TimelineApiRouter interface {
	FollowArtist(http.ResponseWriter, *http.Request)
	GetFollowingArtists(http.ResponseWriter, *http.Request)
	UnfollowArtist(http.ResponseWriter, *http.Request)
}

TimelineApiRouter defines the required methods for binding the api requests to a responses for the TimelineApi The TimelineApiRouter implementation should parse necessary information from the http request, pass the data to a TimelineApiServicer to perform the required actions, then write the service results to the http response.

type TimelineApiService

type TimelineApiService struct {
}

TimelineApiService is a service that implents the logic for the TimelineApiServicer This service should implement the business logic for every endpoint for the TimelineApi API. Include any external packages or services that will be required by this service.

func (*TimelineApiService) FollowArtist

func (s *TimelineApiService) FollowArtist(ctx context.Context, accountID int32, lightArtistStruct LightArtistStruct) (ImplResponse, error)

FollowArtist - Follow artist

func (*TimelineApiService) GetFollowingArtists

func (s *TimelineApiService) GetFollowingArtists(ctx context.Context, accountID int32, sort string, order string, page int32) (ImplResponse, error)

GetFollowingArtists - Get timeline followings

func (*TimelineApiService) UnfollowArtist

func (s *TimelineApiService) UnfollowArtist(ctx context.Context, accountID int32, lightArtistStruct LightArtistStruct) (ImplResponse, error)

UnfollowArtist - Unfollow artist

type TimelineApiServicer

type TimelineApiServicer interface {
	FollowArtist(context.Context, int32, LightArtistStruct) (ImplResponse, error)
	GetFollowingArtists(context.Context, int32, string, string, int32) (ImplResponse, error)
	UnfollowArtist(context.Context, int32, LightArtistStruct) (ImplResponse, error)
}

TimelineApiServicer defines the api actions for the TimelineApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

func NewTimelineApiService

func NewTimelineApiService() TimelineApiServicer

NewTimelineApiService creates a default api service

type UploadHistoryStruct

type UploadHistoryStruct struct {

	// 情報作成者のアカウントID
	AccountID int32 `json:"accountID"`

	// 投稿に成功した場合入るID
	ArtID int32 `json:"artID"`

	// データ登録完了時刻
	Finished string `json:"finished"`

	// データ登録処理開始時刻
	Started string `json:"started"`

	// 登録処理結果 5:成功 9:内部エラー
	Status int32 `json:"status"`

	// 通し投稿履歴番号(インデックス用)
	UploadID int32 `json:"uploadID"`
}

UploadHistoryStruct - 投稿履歴の応答構造体

Jump to

Keyboard shortcuts

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