auth

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializePlatformConfig

func InitializePlatformConfig(platform string) interface{}

InitializePlatformConfig 初始化平台配置

Types

type AbosendConfig

type AbosendConfig struct {
	ApiDomain string `json:"api_domain"`
	Access    string `json:"access"`
	Secret    string `json:"secret"`
	Template  string `json:"template"`
}

AbosendConfig Abosend 配置

func (*AbosendConfig) Marshal

func (l *AbosendConfig) Marshal() string

func (*AbosendConfig) Unmarshal

func (l *AbosendConfig) Unmarshal(data string) error

type AlibabaCloudConfig

type AlibabaCloudConfig struct {
	Access       string `json:"access"`
	Secret       string `json:"secret"`
	SignName     string `json:"sign_name"`
	Endpoint     string `json:"endpoint"`
	TemplateCode string `json:"template_code"`
}

AlibabaCloudConfig 阿里云配置

func (*AlibabaCloudConfig) Marshal

func (l *AlibabaCloudConfig) Marshal() string

func (*AlibabaCloudConfig) Unmarshal

func (l *AlibabaCloudConfig) Unmarshal(data string) error

type AppleAuthConfig

type AppleAuthConfig struct {
	TeamID       string `json:"team_id"`
	KeyID        string `json:"key_id"`
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RedirectURL  string `json:"redirect_url"`
}

AppleAuthConfig Apple 认证配置

func (*AppleAuthConfig) Marshal

func (l *AppleAuthConfig) Marshal() string

func (*AppleAuthConfig) Unmarshal

func (l *AppleAuthConfig) Unmarshal(data string) error

type DeviceConfig

type DeviceConfig struct {
	ShowAds        bool   `json:"show_ads"`
	OnlyRealDevice bool   `json:"only_real_device"`
	EnableSecurity bool   `json:"enable_security"`
	SecuritySecret string `json:"security_secret"`
}

DeviceConfig 设备认证配置

func (*DeviceConfig) Marshal

func (l *DeviceConfig) Marshal() string

func (*DeviceConfig) Unmarshal

func (l *DeviceConfig) Unmarshal(data string) error

type EmailAuthConfig

type EmailAuthConfig struct {
	Platform                   string      `json:"platform"`
	PlatformConfig             interface{} `json:"platform_config"`
	EnableVerify               bool        `json:"enable_verify"`
	EnableNotify               bool        `json:"enable_notify"`
	EnableDomainSuffix         bool        `json:"enable_domain_suffix"`
	DomainSuffixList           string      `json:"domain_suffix_list"`
	VerifyEmailTemplate        string      `json:"verify_email_template"`
	ExpirationEmailTemplate    string      `json:"expiration_email_template"`
	MaintenanceEmailTemplate   string      `json:"maintenance_email_template"`
	TrafficExceedEmailTemplate string      `json:"traffic_exceed_email_template"`
}

EmailAuthConfig 邮箱认证配置

func (*EmailAuthConfig) ApplyDefaultEmailTemplates

func (l *EmailAuthConfig) ApplyDefaultEmailTemplates()

ApplyDefaultEmailTemplates fills empty template fields from pkg/email defaults.

func (*EmailAuthConfig) Marshal

func (l *EmailAuthConfig) Marshal() string

func (*EmailAuthConfig) Unmarshal

func (l *EmailAuthConfig) Unmarshal(data string)

type FacebookAuthConfig

type FacebookAuthConfig struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RedirectURL  string `json:"redirect_url"`
}

FacebookAuthConfig Facebook 认证配置

func (*FacebookAuthConfig) Marshal

func (l *FacebookAuthConfig) Marshal() string

func (*FacebookAuthConfig) Unmarshal

func (l *FacebookAuthConfig) Unmarshal(data string) error

type GithubAuthConfig

type GithubAuthConfig struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RedirectURL  string `json:"redirect_url"`
}

GithubAuthConfig Github 认证配置

func (*GithubAuthConfig) Marshal

func (l *GithubAuthConfig) Marshal() string

func (*GithubAuthConfig) Unmarshal

func (l *GithubAuthConfig) Unmarshal(data string) error

type GoogleAuthConfig

type GoogleAuthConfig struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RedirectURL  string `json:"redirect_url"`
}

GoogleAuthConfig Google 认证配置

func (*GoogleAuthConfig) Marshal

func (l *GoogleAuthConfig) Marshal() string

func (*GoogleAuthConfig) Unmarshal

func (l *GoogleAuthConfig) Unmarshal(data string) error

type MobileAuthConfig

type MobileAuthConfig struct {
	Platform        string      `json:"platform"`
	PlatformConfig  interface{} `json:"platform_config"`
	EnableWhitelist bool        `json:"enable_whitelist"`
	Whitelist       []string    `json:"whitelist"`
}

MobileAuthConfig 手机认证配置

func (*MobileAuthConfig) Marshal

func (l *MobileAuthConfig) Marshal() string

func (*MobileAuthConfig) Unmarshal

func (l *MobileAuthConfig) Unmarshal(data string)

type SMTPConfig

type SMTPConfig struct {
	Host string `json:"host"`
	Port int    `json:"port"`
	User string `json:"user"`
	Pass string `json:"pass"`
	From string `json:"from"`
	SSL  bool   `json:"ssl"`
}

SMTPConfig Email SMTP 配置

func (*SMTPConfig) Marshal

func (l *SMTPConfig) Marshal() string

func (*SMTPConfig) Unmarshal

func (l *SMTPConfig) Unmarshal(data string) error

type SmsbaoConfig

type SmsbaoConfig struct {
	Access   string `json:"access"`
	Secret   string `json:"secret"`
	Template string `json:"template"`
}

SmsbaoConfig 短信宝配置

func (*SmsbaoConfig) Marshal

func (l *SmsbaoConfig) Marshal() string

func (*SmsbaoConfig) Unmarshal

func (l *SmsbaoConfig) Unmarshal(data string) error

type TelegramAuthConfig

type TelegramAuthConfig struct {
	BotToken      string `json:"bot_token"`
	EnableNotify  bool   `json:"enable_notify"`
	WebHookDomain string `json:"webhook_domain"`
}

TelegramAuthConfig Telegram 认证配置

func (*TelegramAuthConfig) Marshal

func (l *TelegramAuthConfig) Marshal() string

func (*TelegramAuthConfig) Unmarshal

func (l *TelegramAuthConfig) Unmarshal(data string) error

type TwilioConfig

type TwilioConfig struct {
	Access      string `json:"access"`
	Secret      string `json:"secret"`
	PhoneNumber string `json:"phone_number"`
	Template    string `json:"template"`
}

TwilioConfig Twilio 配置

func (*TwilioConfig) Marshal

func (l *TwilioConfig) Marshal() string

func (*TwilioConfig) Unmarshal

func (l *TwilioConfig) Unmarshal(data string) error

Jump to

Keyboard shortcuts

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