Documentation
¶
Index ¶
- func Execute()
- func GenDocs() error
- func GenerateAdminToken(appId string, secretKey string, expire int, values []string) (string, error)
- func GenerateToken(tokenTmpl string, appId string, secretKey string, expire int, values []string) (string, error)
- func GetChannel(channelId string, token string) (string, error)
- func VerifyToken(tokenString string, secretKey string) error
- type SkyWayAdminAuthToken
- type SkyWayAuthToken
- type SkyWayAuthTokenAppScope
- type SkyWayAuthTokenChannelScope
- type SkyWayAuthTokenForwardingScope
- type SkyWayAuthTokenMemberScope
- type SkyWayAuthTokenPublicationScope
- type SkyWayAuthTokenScope
- type SkyWayAuthTokenSfuBotScope
- type SkyWayAuthTokenSubscriptionScope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GenerateAdminToken ¶
func GenerateToken ¶
func VerifyToken ¶
Types ¶
type SkyWayAdminAuthToken ¶
type SkyWayAdminAuthToken struct {
Jti string `json:"jti"`
Iat int `json:"iat"`
Exp int `json:"exp"`
AppId string `json:"appId"`
jwt.MapClaims `json:"-"`
}
func DecodeAdminToken ¶
func DecodeAdminToken(token string) (SkyWayAdminAuthToken, error)
type SkyWayAuthToken ¶
type SkyWayAuthToken struct {
Jti string `json:"jti"`
Iat int `json:"iat"`
Exp int `json:"exp"`
Version int `json:"version"`
Scope SkyWayAuthTokenScope `json:"scope"`
jwt.MapClaims `json:"-"`
}
func DecodeToken ¶
func DecodeToken(token string) (SkyWayAuthToken, error)
type SkyWayAuthTokenAppScope ¶
type SkyWayAuthTokenAppScope struct {
Id string `json:"id"`
Actions []string `json:"actions"`
Turn bool `json:"turn"`
Analytics bool `json:"analytics"`
Channels []SkyWayAuthTokenChannelScope `json:"channels"`
}
type SkyWayAuthTokenChannelScope ¶
type SkyWayAuthTokenChannelScope struct {
Id string `json:"id"`
Name string `json:"name"`
Actions []string `json:"actions"`
Members []SkyWayAuthTokenMemberScope `json:"members"`
SfuBots []SkyWayAuthTokenSfuBotScope `json:"sfuBots"`
}
type SkyWayAuthTokenForwardingScope ¶
type SkyWayAuthTokenForwardingScope struct {
Actions []string `json:"actions"`
}
type SkyWayAuthTokenMemberScope ¶
type SkyWayAuthTokenMemberScope struct {
Id string `json:"id"`
Name string `json:"name"`
Actions []string `json:"actions"`
Publication SkyWayAuthTokenPublicationScope `json:"publication"`
Subscription SkyWayAuthTokenSubscriptionScope `json:"subscription"`
}
type SkyWayAuthTokenPublicationScope ¶
type SkyWayAuthTokenPublicationScope struct {
Actions []string `json:"actions"`
}
type SkyWayAuthTokenScope ¶
type SkyWayAuthTokenScope struct {
App SkyWayAuthTokenAppScope `json:"app"`
}
type SkyWayAuthTokenSfuBotScope ¶
type SkyWayAuthTokenSfuBotScope struct {
Actions []string `json:"actions"`
Forwardings []SkyWayAuthTokenForwardingScope `json:"forwardings"`
}
type SkyWayAuthTokenSubscriptionScope ¶
type SkyWayAuthTokenSubscriptionScope struct {
Actions []string `json:"actions"`
}
Click to show internal directories.
Click to hide internal directories.