Documentation
¶
Index ¶
- Variables
- func DeleteBridge(domain, bridgeName, token string) error
- func PostBridgeState(domain, username, bridgeName, asToken string, data ReqPostBridgeState) error
- func SendLoginEmail(baseDomain, request, email string) error
- type BridgeState
- type ReqPostBridgeState
- type ReqSendLoginCode
- type ReqSendLoginEmail
- type RespSendLoginCode
- type RespStartLogin
- type RespWhoami
- type WhoamiAsmuxData
- type WhoamiBridge
- type WhoamiUser
- type WhoamiUserInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidLoginCode = fmt.Errorf("invalid login code")
Functions ¶
func DeleteBridge ¶
func PostBridgeState ¶
func PostBridgeState(domain, username, bridgeName, asToken string, data ReqPostBridgeState) error
func SendLoginEmail ¶ added in v0.4.0
Types ¶
type BridgeState ¶
type BridgeState struct {
Username string `json:"username"`
Bridge string `json:"bridge"`
StateEvent status.BridgeStateEvent `json:"stateEvent"`
Source string `json:"source"`
CreatedAt time.Time `json:"createdAt"`
Reason string `json:"reason"`
Info map[string]any `json:"info"`
IsSelfHosted bool `json:"isSelfHosted"`
BridgeType string `json:"bridgeType"`
}
type ReqPostBridgeState ¶
type ReqSendLoginCode ¶ added in v0.4.0
type ReqSendLoginEmail ¶ added in v0.4.0
type RespSendLoginCode ¶ added in v0.4.0
type RespSendLoginCode struct {
LoginToken string `json:"token"`
Whoami *RespWhoami `json:"whoami"`
}
func SendLoginCode ¶ added in v0.4.0
func SendLoginCode(baseDomain, request, code string) (resp *RespSendLoginCode, err error)
type RespStartLogin ¶ added in v0.4.0
type RespStartLogin struct {
RequestID string `json:"request"`
Type []string `json:"type"`
Expires time.Time `json:"expires"`
}
func StartLogin ¶ added in v0.4.0
func StartLogin(baseDomain string) (resp *RespStartLogin, err error)
type RespWhoami ¶
type RespWhoami struct {
User WhoamiUser `json:"user"`
UserInfo WhoamiUserInfo `json:"userInfo"`
}
func Whoami ¶
func Whoami(baseDomain, token string) (resp *RespWhoami, err error)
type WhoamiAsmuxData ¶
type WhoamiAsmuxData struct {
LoginToken string `json:"login_token"`
}
type WhoamiBridge ¶
type WhoamiBridge struct {
Version string `json:"version"`
ConfigHash string `json:"configHash"`
OtherVersions []struct {
Name string `json:"name"`
Version string `json:"version"`
} `json:"otherVersions"`
BridgeState BridgeState `json:"bridgeState"`
RemoteState map[string]status.BridgeState `json:"remoteState"`
}
type WhoamiUser ¶
type WhoamiUser struct {
Bridges map[string]WhoamiBridge `json:"bridges"`
Hungryserv WhoamiBridge `json:"hungryserv"`
AsmuxData WhoamiAsmuxData `json:"asmuxData"`
}
type WhoamiUserInfo ¶
type WhoamiUserInfo struct {
CreatedAt time.Time `json:"createdAt"`
Username string `json:"username"`
Email string `json:"email"`
FullName string `json:"fullName"`
Channel string `json:"channel"`
Admin bool `json:"isAdmin"`
BridgeChangesLocked bool `json:"isUserBridgeChangesLocked"`
Free bool `json:"isFree"`
DeletedAt time.Time `json:"deletedAt"`
SupportRoomID id.RoomID `json:"supportRoomId"`
UseHungryserv bool `json:"useHungryserv"`
BridgeClusterID string `json:"bridgeClusterId"`
AnalyticsID string `json:"analyticsId"`
HungryURL string `json:"hungryUrl"`
}
Click to show internal directories.
Click to hide internal directories.