Documentation
¶
Index ¶
- Variables
- func Decrypt(decrypted string, secret string) string
- func Encrypt(raw string, secret string) string
- func GetOauthProviderTitle(list []*OauthProvider, name string) string
- type AppInfo
- type AppInfoFromAccount
- type AppInfoFromOpenApp
- type OauthOption
- type OauthProvider
- type OauthProvidersResponse
- type Options
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var AppInfoDefaultGetter = func(ctx echo.Context, cond db.Compound) (appInfo AppInfo, err error) { err = ctx.NewError(code.Unsupported, `尚未设置App信息获取方式`) return }
View Source
var OauthOptionsCreater = func(ctx echo.Context, typ Type, generators ...sdk_options.URLValuesGenerator) OauthOption { return NewOptions(ctx, TypeOauth, generators...) }
Functions ¶
func GetOauthProviderTitle ¶
func GetOauthProviderTitle(list []*OauthProvider, name string) string
Types ¶
type AppInfoFromAccount ¶
type AppInfoFromAccount struct {
Account *dbschema.OfficialCommonApiAccount
URLPrefix string
}
func (AppInfoFromAccount) GetApiEndpoint ¶
func (a AppInfoFromAccount) GetApiEndpoint() string
func (AppInfoFromAccount) GetAppID ¶
func (a AppInfoFromAccount) GetAppID() string
func (AppInfoFromAccount) GetAppSecret ¶
func (a AppInfoFromAccount) GetAppSecret() string
type AppInfoFromOpenApp ¶
func (AppInfoFromOpenApp) GetApiEndpoint ¶
func (a AppInfoFromOpenApp) GetApiEndpoint() string
func (AppInfoFromOpenApp) GetAppID ¶
func (a AppInfoFromOpenApp) GetAppID() string
func (AppInfoFromOpenApp) GetAppSecret ¶
func (a AppInfoFromOpenApp) GetAppSecret() string
type OauthOption ¶
type OauthProvider ¶
type OauthProvider struct {
Name string `json:"name" xml:"name"`
English string `json:"english" xml:"english"`
IconClass string `json:"iconClass" xml:"iconClass"`
IconImage string `json:"iconImage" xml:"iconImage"`
WrapClass string `json:"wrapClass" xml:"wrapClass"`
LoginURL string `json:"loginURL" xml:"loginURL"`
}
func GetOauthProvider ¶
func GetOauthProvider(list []*OauthProvider, name string) *OauthProvider
func OauthProviders ¶
func OauthProviders(ctx echo.Context) ([]*OauthProvider, error)
func OauthProvidersFrom ¶
func OauthProvidersFrom(accounts []oauth2.Account) []*OauthProvider
type OauthProvidersResponse ¶
type OauthProvidersResponse struct {
List []*OauthProvider `json:"list"`
}
type Options ¶
type Options struct {
*sdk_options.Options
// contains filtered or unexported fields
}
func NewOptions ¶
func NewOptions(ctx echo.Context, typ Type, generators ...sdk_options.URLValuesGenerator) *Options
func (*Options) ApplySetting ¶
func (*Options) GetAccountID ¶
type Type ¶
type Type = sdk_options.Type
const ( // TypeOauth 社区登录类型 TypeOauth Type = sdk_options.TypeOauth // TypePayment 支付类型 TypePayment Type = sdk_options.TypePayment )
Click to show internal directories.
Click to hide internal directories.