Documentation
¶
Index ¶
- func NowSelectedAccount() (*model.Account, bool)
- func SetCtx(c context.Context)
- type AccountsView
- func (v *AccountsView) AddAccount(req *AddAccountReq) *AddAccountResp
- func (v *AccountsView) GetAccounts() *GetAccountsResp
- func (v *AccountsView) GetSelectedAccount() *GetSelectedAccountResp
- func (v *AccountsView) RemoveAccount(id uint) *GetAccountsResp
- func (v *AccountsView) SelectOneAccount(id uint) *SelectOneAccountResp
- type AddAccountReq
- type AddAccountResp
- type AgreementView
- type GetAccountsResp
- type GetAccountsRespAccount
- type GetHomeResp
- type GetHomeRespAdvancedConfig
- type GetHomeRespButton
- type GetHomeRespCommand
- type GetHomeRespData
- type GetHomeRespGame
- type GetHomeRespKeyboardGroup
- type GetHomeRespPic
- type GetHomeRespReply
- type GetHomeRespRobotInfo
- type GetHomeRespText
- type GetSelectedAccountResp
- type HomeView
- type SelectOneAccountResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NowSelectedAccount ¶
Types ¶
type AccountsView ¶
type AccountsView struct {
}
func (*AccountsView) AddAccount ¶
func (v *AccountsView) AddAccount(req *AddAccountReq) *AddAccountResp
func (*AccountsView) GetAccounts ¶
func (v *AccountsView) GetAccounts() *GetAccountsResp
func (*AccountsView) GetSelectedAccount ¶
func (v *AccountsView) GetSelectedAccount() *GetSelectedAccountResp
func (*AccountsView) RemoveAccount ¶
func (v *AccountsView) RemoveAccount(id uint) *GetAccountsResp
func (*AccountsView) SelectOneAccount ¶
func (v *AccountsView) SelectOneAccount(id uint) *SelectOneAccountResp
type AddAccountReq ¶
type AddAccountReq struct {
Token string `json:"token"`
}
type AddAccountResp ¶
type AgreementView ¶
type AgreementView struct {
}
func (*AgreementView) Quit ¶
func (a *AgreementView) Quit()
type GetAccountsResp ¶
type GetAccountsResp struct {
Ok bool `json:"ok"`
Error string `json:"error"`
Accounts []*GetAccountsRespAccount `json:"accounts"`
}
type GetAccountsRespAccount ¶
type GetAccountsRespAccount struct {
ID uint `gorm:"primarykey" json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Token string `gorm:"column:token;type:text;not null;" json:"token"`
FirstName string `gorm:"column:first_name;type:text;not null;default:'';" json:"first_name"`
LastName string `gorm:"column:last_name;type:text;not null;default:'';" json:"last_name"`
UserName string `gorm:"column:username;type:text;not null;default:'';" json:"username"`
Running bool `json:"running"`
}
type GetHomeResp ¶
type GetHomeResp struct {
Ok bool `json:"ok"`
Error string `json:"error"`
Data GetHomeRespData `json:"data"`
}
type GetHomeRespAdvancedConfig ¶
type GetHomeRespAdvancedConfig struct {
ChatGptEnabled bool `json:"ChatGptEnabled"`
ChatGptApiKey string `json:"ChatGptApiKey"`
ChatGptHttpProxy string `json:"ChatGptHttpProxy"`
ChatGptModel string `json:"ChatGptModel"`
ChatGptSystemPrompt string `json:"ChatGptSystemPrompt"`
ChatGptBaseUrl string `json:"ChatGptBaseUrl"`
ChatGptTemperature string `json:"ChatGptTemperature"`
ChatGptMaxTokens string `json:"ChatGptMaxTokens"`
ChatGptTopP string `json:"ChatGptTopP"`
ChatGptPresencePenalty string `json:"ChatGptPresencePenalty"`
ChatGptFrequencyPenalty string `json:"ChatGptFrequencyPenalty"`
ChatGptHistoryCount string `json:"ChatGptHistoryCount"`
ChatGptTimeout string `json:"ChatGptTimeout"`
}
type GetHomeRespButton ¶
type GetHomeRespCommand ¶
type GetHomeRespData ¶
type GetHomeRespData struct {
Running bool `json:"running"`
RobotInfo GetHomeRespRobotInfo `json:"robotInfo"`
KeyboardGroups []GetHomeRespKeyboardGroup `json:"keyboardGroups"`
Replies []GetHomeRespReply `json:"replies"`
Commands []GetHomeRespCommand `json:"commands"`
AdvancedConfig GetHomeRespAdvancedConfig `json:"advancedConfig"`
}
type GetHomeRespGame ¶
type GetHomeRespPic ¶
type GetHomeRespPic struct {
Base64 string `json:"Base64"`
}
type GetHomeRespReply ¶
type GetHomeRespReply struct {
Id string `json:"id"`
Name string `json:"name"`
IsTemplate string `json:"isTemplate"`
MessageType string `json:"messageType"`
GameContent GetHomeRespGame `json:"gameContent"`
PicContent GetHomeRespPic `json:"picContent"`
TextContent GetHomeRespText `json:"textContent"`
ExpandType string `json:"expandType"`
KeyboardGroupId string `json:"keyboardGroupId"`
KeyboardGroupName string `json:"keyboardGroupName"`
Buttons []GetHomeRespButton `json:"buttons"`
}
type GetHomeRespRobotInfo ¶
type GetHomeRespText ¶
type GetHomeRespText struct {
Content string `json:"Content"`
}
type GetSelectedAccountResp ¶
type HomeView ¶
type HomeView struct {
}
func (*HomeView) GetHome ¶
func (v *HomeView) GetHome() *GetHomeResp
func (*HomeView) SaveHome ¶
func (v *HomeView) SaveHome(req *GetHomeRespData) *GetHomeResp
func (*HomeView) SetRunning ¶
func (v *HomeView) SetRunning(running bool) *GetHomeResp
type SelectOneAccountResp ¶
Click to show internal directories.
Click to hide internal directories.