Documentation ¶
Index ¶
- Constants
- type ACMEAuthentication
- type ACMEAuthenticationDAO
- type ACMEAuthenticationOperator
- type ACMEProviderAccount
- type ACMEProviderAccountDAO
- func (this *ACMEProviderAccountDAO) CheckUserAccount(tx *dbs.Tx, userId int64, accountId int64) error
- func (this *ACMEProviderAccountDAO) CountAllEnabledAccounts(tx *dbs.Tx, userId int64) (int64, error)
- func (this *ACMEProviderAccountDAO) CreateAccount(tx *dbs.Tx, userId int64, name string, providerCode string, eabKid string, ...) (int64, error)
- func (this *ACMEProviderAccountDAO) DisableACMEProviderAccount(tx *dbs.Tx, id int64) error
- func (this *ACMEProviderAccountDAO) EnableACMEProviderAccount(tx *dbs.Tx, id int64) error
- func (this *ACMEProviderAccountDAO) FindACMEProviderAccountName(tx *dbs.Tx, id int64) (string, error)
- func (this *ACMEProviderAccountDAO) FindAllEnabledAccountsWithProviderCode(tx *dbs.Tx, userId int64, providerCode string) (result []*ACMEProviderAccount, err error)
- func (this *ACMEProviderAccountDAO) FindEnabledACMEProviderAccount(tx *dbs.Tx, id int64) (*ACMEProviderAccount, error)
- func (this *ACMEProviderAccountDAO) ListEnabledAccounts(tx *dbs.Tx, userId int64, offset int64, size int64) (result []*ACMEProviderAccount, err error)
- func (this *ACMEProviderAccountDAO) UpdateAccount(tx *dbs.Tx, accountId int64, name string, eabKid string, eabKey string) error
- type ACMEProviderAccountOperator
- type ACMETask
- type ACMETaskDAO
- func (this *ACMETaskDAO) CheckUserACMETask(tx *dbs.Tx, userId int64, acmeTaskId int64) (bool, error)
- func (this *ACMETaskDAO) CountACMETasksWithACMEUserId(tx *dbs.Tx, acmeUserId int64) (int64, error)
- func (this *ACMETaskDAO) CountACMETasksWithDNSProviderId(tx *dbs.Tx, dnsProviderId int64) (int64, error)
- func (this *ACMETaskDAO) CountAllEnabledACMETasks(tx *dbs.Tx, userId int64, isAvailable bool, isExpired bool, expiringDays int64, ...) (int64, error)
- func (this *ACMETaskDAO) CreateACMETask(tx *dbs.Tx, adminId int64, userId int64, authType acmeutils.AuthType, ...) (int64, error)
- func (this *ACMETaskDAO) DisableACMETask(tx *dbs.Tx, id int64) error
- func (this *ACMETaskDAO) DisableAllTasksWithCertId(tx *dbs.Tx, certId int64) error
- func (this *ACMETaskDAO) EnableACMETask(tx *dbs.Tx, id int64) error
- func (this *ACMETaskDAO) FindACMETaskUserId(tx *dbs.Tx, taskId int64) (userId int64, err error)
- func (this *ACMETaskDAO) FindEnabledACMETask(tx *dbs.Tx, id int64) (*ACMETask, error)
- func (this *ACMETaskDAO) ListEnabledACMETasks(tx *dbs.Tx, userId int64, isAvailable bool, isExpired bool, expiringDays int64, ...) (result []*ACMETask, err error)
- func (this *ACMETaskDAO) RunTask(tx *dbs.Tx, taskId int64) (isOk bool, errMsg string, resultCertId int64)
- func (this *ACMETaskDAO) UpdateACMETask(tx *dbs.Tx, acmeTaskId int64, acmeUserId int64, dnsProviderId int64, ...) error
- func (this *ACMETaskDAO) UpdateACMETaskCert(tx *dbs.Tx, taskId int64, certId int64) error
- type ACMETaskLog
- type ACMETaskLogDAO
- type ACMETaskLogOperator
- type ACMETaskOperator
- type ACMEUser
- type ACMEUserDAO
- func (this *ACMEUserDAO) CheckACMEUser(tx *dbs.Tx, acmeUserId int64, adminId int64, userId int64) (bool, error)
- func (this *ACMEUserDAO) CountACMEUsersWithAdminId(tx *dbs.Tx, adminId int64, userId int64, accountId int64) (int64, error)
- func (this *ACMEUserDAO) CreateACMEUser(tx *dbs.Tx, adminId int64, userId int64, providerCode string, accountId int64, ...) (int64, error)
- func (this *ACMEUserDAO) DisableACMEUser(tx *dbs.Tx, id int64) error
- func (this *ACMEUserDAO) EnableACMEUser(tx *dbs.Tx, id int64) error
- func (this *ACMEUserDAO) FindAllACMEUsers(tx *dbs.Tx, adminId int64, userId int64, providerCode string) (result []*ACMEUser, err error)
- func (this *ACMEUserDAO) FindEnabledACMEUser(tx *dbs.Tx, id int64) (*ACMEUser, error)
- func (this *ACMEUserDAO) ListACMEUsers(tx *dbs.Tx, adminId int64, userId int64, offset int64, size int64) (result []*ACMEUser, err error)
- func (this *ACMEUserDAO) UpdateACMEUser(tx *dbs.Tx, acmeUserId int64, description string) error
- func (this *ACMEUserDAO) UpdateACMEUserRegistration(tx *dbs.Tx, acmeUserId int64, registrationJSON []byte) error
- type ACMEUserOperator
Constants ¶
const ( ACMEProviderAccountStateEnabled = 1 // 已启用 ACMEProviderAccountStateDisabled = 0 // 已禁用 )
const ( ACMETaskStateEnabled = 1 // 已启用 ACMETaskStateDisabled = 0 // 已禁用 )
const ( ACMEUserStateEnabled = 1 // 已启用 ACMEUserStateDisabled = 0 // 已禁用 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACMEAuthentication ¶
type ACMEAuthentication struct { Id uint64 `field:"id"` // ID TaskId uint64 `field:"taskId"` // 任务ID Domain string `field:"domain"` // 域名 Token string `field:"token"` // 令牌 Key string `field:"key"` // 密钥 CreatedAt uint64 `field:"createdAt"` // 创建时间 }
ACME认证
type ACMEAuthenticationDAO ¶
func NewACMEAuthenticationDAO ¶
func NewACMEAuthenticationDAO() *ACMEAuthenticationDAO
func (*ACMEAuthenticationDAO) CreateAuth ¶
func (this *ACMEAuthenticationDAO) CreateAuth(tx *dbs.Tx, taskId int64, domain string, token string, key string) error
创建认证信息
func (*ACMEAuthenticationDAO) FindAuthWithToken ¶
func (this *ACMEAuthenticationDAO) FindAuthWithToken(tx *dbs.Tx, token string) (*ACMEAuthentication, error)
根据令牌查找认证信息
type ACMEAuthenticationOperator ¶
type ACMEAuthenticationOperator struct { Id interface{} // ID TaskId interface{} // 任务ID Domain interface{} // 域名 Token interface{} // 令牌 Key interface{} // 密钥 CreatedAt interface{} // 创建时间 }
func NewACMEAuthenticationOperator ¶
func NewACMEAuthenticationOperator() *ACMEAuthenticationOperator
type ACMEProviderAccount ¶
type ACMEProviderAccount struct { Id uint64 `field:"id"` // ID UserId uint64 `field:"userId"` // 用户ID IsOn bool `field:"isOn"` // 是否启用 Name string `field:"name"` // 名称 ProviderCode string `field:"providerCode"` // 代号 EabKid string `field:"eabKid"` // KID EabKey string `field:"eabKey"` // Key Error string `field:"error"` // 最后一条错误信息 State uint8 `field:"state"` // 状态 }
ACMEProviderAccount ACME提供商
type ACMEProviderAccountDAO ¶
func NewACMEProviderAccountDAO ¶
func NewACMEProviderAccountDAO() *ACMEProviderAccountDAO
func (*ACMEProviderAccountDAO) CheckUserAccount ¶ added in v0.5.2
func (this *ACMEProviderAccountDAO) CheckUserAccount(tx *dbs.Tx, userId int64, accountId int64) error
CheckUserAccount 检查是否为用户的服务商账号
func (*ACMEProviderAccountDAO) CountAllEnabledAccounts ¶
func (this *ACMEProviderAccountDAO) CountAllEnabledAccounts(tx *dbs.Tx, userId int64) (int64, error)
CountAllEnabledAccounts 计算账号数量
func (*ACMEProviderAccountDAO) CreateAccount ¶
func (this *ACMEProviderAccountDAO) CreateAccount(tx *dbs.Tx, userId int64, name string, providerCode string, eabKid string, eabKey string) (int64, error)
CreateAccount 创建账号
func (*ACMEProviderAccountDAO) DisableACMEProviderAccount ¶
func (this *ACMEProviderAccountDAO) DisableACMEProviderAccount(tx *dbs.Tx, id int64) error
DisableACMEProviderAccount 禁用条目
func (*ACMEProviderAccountDAO) EnableACMEProviderAccount ¶
func (this *ACMEProviderAccountDAO) EnableACMEProviderAccount(tx *dbs.Tx, id int64) error
EnableACMEProviderAccount 启用条目
func (*ACMEProviderAccountDAO) FindACMEProviderAccountName ¶
func (this *ACMEProviderAccountDAO) FindACMEProviderAccountName(tx *dbs.Tx, id int64) (string, error)
FindACMEProviderAccountName 根据主键查找名称
func (*ACMEProviderAccountDAO) FindAllEnabledAccountsWithProviderCode ¶
func (this *ACMEProviderAccountDAO) FindAllEnabledAccountsWithProviderCode(tx *dbs.Tx, userId int64, providerCode string) (result []*ACMEProviderAccount, err error)
FindAllEnabledAccountsWithProviderCode 根据服务商代号查找账号
func (*ACMEProviderAccountDAO) FindEnabledACMEProviderAccount ¶
func (this *ACMEProviderAccountDAO) FindEnabledACMEProviderAccount(tx *dbs.Tx, id int64) (*ACMEProviderAccount, error)
FindEnabledACMEProviderAccount 查找启用中的条目
func (*ACMEProviderAccountDAO) ListEnabledAccounts ¶
func (this *ACMEProviderAccountDAO) ListEnabledAccounts(tx *dbs.Tx, userId int64, offset int64, size int64) (result []*ACMEProviderAccount, err error)
ListEnabledAccounts 查找单页账号
func (*ACMEProviderAccountDAO) UpdateAccount ¶
func (this *ACMEProviderAccountDAO) UpdateAccount(tx *dbs.Tx, accountId int64, name string, eabKid string, eabKey string) error
UpdateAccount 修改账号
type ACMEProviderAccountOperator ¶
type ACMEProviderAccountOperator struct { Id any // ID UserId any // 用户ID IsOn any // 是否启用 Name any // 名称 ProviderCode any // 代号 EabKid any // KID EabKey any // Key Error any // 最后一条错误信息 State any // 状态 }
func NewACMEProviderAccountOperator ¶
func NewACMEProviderAccountOperator() *ACMEProviderAccountOperator
type ACMETask ¶
type ACMETask struct { Id uint64 `field:"id"` // ID AdminId uint32 `field:"adminId"` // 管理员ID UserId uint32 `field:"userId"` // 用户ID IsOn bool `field:"isOn"` // 是否启用 AcmeUserId uint32 `field:"acmeUserId"` // ACME用户ID DnsDomain string `field:"dnsDomain"` // DNS主域名 DnsProviderId uint64 `field:"dnsProviderId"` // DNS服务商 Domains dbs.JSON `field:"domains"` // 证书域名 CreatedAt uint64 `field:"createdAt"` // 创建时间 State uint8 `field:"state"` // 状态 CertId uint64 `field:"certId"` // 生成的证书ID AutoRenew uint8 `field:"autoRenew"` // 是否自动更新 AuthType string `field:"authType"` // 认证类型 AuthURL string `field:"authURL"` // 认证URL }
ACMETask ACME任务
func (*ACMETask) DecodeDomains ¶
DecodeDomains 将域名解析成字符串数组
type ACMETaskDAO ¶
func NewACMETaskDAO ¶
func NewACMETaskDAO() *ACMETaskDAO
func (*ACMETaskDAO) CheckUserACMETask ¶ added in v1.2.10
func (this *ACMETaskDAO) CheckUserACMETask(tx *dbs.Tx, userId int64, acmeTaskId int64) (bool, error)
CheckUserACMETask 检查用户权限
func (*ACMETaskDAO) CountACMETasksWithACMEUserId ¶
CountACMETasksWithACMEUserId 计算某个ACME用户相关的任务数量
func (*ACMETaskDAO) CountACMETasksWithDNSProviderId ¶
func (this *ACMETaskDAO) CountACMETasksWithDNSProviderId(tx *dbs.Tx, dnsProviderId int64) (int64, error)
CountACMETasksWithDNSProviderId 计算某个DNS服务商相关的任务数量
func (*ACMETaskDAO) CountAllEnabledACMETasks ¶
func (this *ACMETaskDAO) CountAllEnabledACMETasks(tx *dbs.Tx, userId int64, isAvailable bool, isExpired bool, expiringDays int64, keyword string, userOnly bool) (int64, error)
CountAllEnabledACMETasks 计算所有任务数量
func (*ACMETaskDAO) CreateACMETask ¶
func (this *ACMETaskDAO) CreateACMETask(tx *dbs.Tx, adminId int64, userId int64, authType acmeutils.AuthType, acmeUserId int64, dnsProviderId int64, dnsDomain string, domains []string, autoRenew bool, authURL string) (int64, error)
CreateACMETask 创建任务
func (*ACMETaskDAO) DisableACMETask ¶
func (this *ACMETaskDAO) DisableACMETask(tx *dbs.Tx, id int64) error
DisableACMETask 禁用条目
func (*ACMETaskDAO) DisableAllTasksWithCertId ¶
func (this *ACMETaskDAO) DisableAllTasksWithCertId(tx *dbs.Tx, certId int64) error
DisableAllTasksWithCertId 停止某个证书相关任务
func (*ACMETaskDAO) EnableACMETask ¶
func (this *ACMETaskDAO) EnableACMETask(tx *dbs.Tx, id int64) error
EnableACMETask 启用条目
func (*ACMETaskDAO) FindACMETaskUserId ¶ added in v1.2.10
FindACMETaskUserId 查找任务所属用户ID
func (*ACMETaskDAO) FindEnabledACMETask ¶
FindEnabledACMETask 查找启用中的条目
func (*ACMETaskDAO) ListEnabledACMETasks ¶
func (this *ACMETaskDAO) ListEnabledACMETasks(tx *dbs.Tx, userId int64, isAvailable bool, isExpired bool, expiringDays int64, keyword string, userOnly bool, offset int64, size int64) (result []*ACMETask, err error)
ListEnabledACMETasks 列出单页任务
func (*ACMETaskDAO) RunTask ¶
func (this *ACMETaskDAO) RunTask(tx *dbs.Tx, taskId int64) (isOk bool, errMsg string, resultCertId int64)
RunTask 执行任务并记录日志
func (*ACMETaskDAO) UpdateACMETask ¶
func (this *ACMETaskDAO) UpdateACMETask(tx *dbs.Tx, acmeTaskId int64, acmeUserId int64, dnsProviderId int64, dnsDomain string, domains []string, autoRenew bool, authURL string) error
UpdateACMETask 修改任务
func (*ACMETaskDAO) UpdateACMETaskCert ¶
UpdateACMETaskCert 设置任务关联的证书
type ACMETaskLog ¶
type ACMETaskLog struct { Id uint64 `field:"id"` // ID TaskId uint64 `field:"taskId"` // 任务ID IsOk bool `field:"isOk"` // 是否成功 Error string `field:"error"` // 错误信息 CreatedAt uint64 `field:"createdAt"` // 运行时间 }
ACMETaskLog ACME任务运行日志
type ACMETaskLogDAO ¶
func NewACMETaskLogDAO ¶
func NewACMETaskLogDAO() *ACMETaskLogDAO
func (*ACMETaskLogDAO) CreateACMETaskLog ¶
func (this *ACMETaskLogDAO) CreateACMETaskLog(tx *dbs.Tx, taskId int64, isOk bool, errMsg string) error
CreateACMETaskLog 生成日志
func (*ACMETaskLogDAO) FindLatestACMETasKLog ¶
func (this *ACMETaskLogDAO) FindLatestACMETasKLog(tx *dbs.Tx, taskId int64) (*ACMETaskLog, error)
FindLatestACMETasKLog 取得任务的最后一条执行日志
type ACMETaskLogOperator ¶
type ACMETaskLogOperator struct { Id interface{} // ID TaskId interface{} // 任务ID IsOk interface{} // 是否成功 Error interface{} // 错误信息 CreatedAt interface{} // 运行时间 }
func NewACMETaskLogOperator ¶
func NewACMETaskLogOperator() *ACMETaskLogOperator
type ACMETaskOperator ¶
type ACMETaskOperator struct { Id interface{} // ID AdminId interface{} // 管理员ID UserId interface{} // 用户ID IsOn interface{} // 是否启用 AcmeUserId interface{} // ACME用户ID DnsDomain interface{} // DNS主域名 DnsProviderId interface{} // DNS服务商 Domains interface{} // 证书域名 CreatedAt interface{} // 创建时间 State interface{} // 状态 CertId interface{} // 生成的证书ID AutoRenew interface{} // 是否自动更新 AuthType interface{} // 认证类型 AuthURL interface{} // 认证URL }
func NewACMETaskOperator ¶
func NewACMETaskOperator() *ACMETaskOperator
type ACMEUser ¶
type ACMEUser struct { Id uint64 `field:"id"` // ID AdminId uint32 `field:"adminId"` // 管理员ID UserId uint32 `field:"userId"` // 用户ID PrivateKey string `field:"privateKey"` // 私钥 Email string `field:"email"` // E-mail CreatedAt uint64 `field:"createdAt"` // 创建时间 State uint8 `field:"state"` // 状态 Description string `field:"description"` // 备注介绍 Registration dbs.JSON `field:"registration"` // 注册信息 ProviderCode string `field:"providerCode"` // 服务商代号 AccountId uint64 `field:"accountId"` // 提供商ID }
ACMEUser ACME用户
type ACMEUserDAO ¶
func NewACMEUserDAO ¶
func NewACMEUserDAO() *ACMEUserDAO
func (*ACMEUserDAO) CheckACMEUser ¶
func (this *ACMEUserDAO) CheckACMEUser(tx *dbs.Tx, acmeUserId int64, adminId int64, userId int64) (bool, error)
CheckACMEUser 检查用户权限
func (*ACMEUserDAO) CountACMEUsersWithAdminId ¶
func (this *ACMEUserDAO) CountACMEUsersWithAdminId(tx *dbs.Tx, adminId int64, userId int64, accountId int64) (int64, error)
CountACMEUsersWithAdminId 计算用户数量
func (*ACMEUserDAO) CreateACMEUser ¶
func (this *ACMEUserDAO) CreateACMEUser(tx *dbs.Tx, adminId int64, userId int64, providerCode string, accountId int64, email string, description string) (int64, error)
CreateACMEUser 创建用户
func (*ACMEUserDAO) DisableACMEUser ¶
func (this *ACMEUserDAO) DisableACMEUser(tx *dbs.Tx, id int64) error
DisableACMEUser 禁用条目
func (*ACMEUserDAO) EnableACMEUser ¶
func (this *ACMEUserDAO) EnableACMEUser(tx *dbs.Tx, id int64) error
EnableACMEUser 启用条目
func (*ACMEUserDAO) FindAllACMEUsers ¶
func (this *ACMEUserDAO) FindAllACMEUsers(tx *dbs.Tx, adminId int64, userId int64, providerCode string) (result []*ACMEUser, err error)
FindAllACMEUsers 查找所有用户
func (*ACMEUserDAO) FindEnabledACMEUser ¶
查找启用中的条目
func (*ACMEUserDAO) ListACMEUsers ¶
func (this *ACMEUserDAO) ListACMEUsers(tx *dbs.Tx, adminId int64, userId int64, offset int64, size int64) (result []*ACMEUser, err error)
ListACMEUsers 列出当前管理员的用户
func (*ACMEUserDAO) UpdateACMEUser ¶
UpdateACMEUser 修改用户信息
func (*ACMEUserDAO) UpdateACMEUserRegistration ¶
func (this *ACMEUserDAO) UpdateACMEUserRegistration(tx *dbs.Tx, acmeUserId int64, registrationJSON []byte) error
UpdateACMEUserRegistration 修改用户ACME注册信息
type ACMEUserOperator ¶
type ACMEUserOperator struct { Id interface{} // ID AdminId interface{} // 管理员ID UserId interface{} // 用户ID PrivateKey interface{} // 私钥 Email interface{} // E-mail CreatedAt interface{} // 创建时间 State interface{} // 状态 Description interface{} // 备注介绍 Registration interface{} // 注册信息 ProviderCode interface{} // 服务商代号 AccountId interface{} // 提供商ID }
func NewACMEUserOperator ¶
func NewACMEUserOperator() *ACMEUserOperator
Source Files ¶
- acme_authentication_dao.go
- acme_authentication_model.go
- acme_authentication_model_ext.go
- acme_provider_account_dao.go
- acme_provider_account_model.go
- acme_provider_account_model_ext.go
- acme_task_dao.go
- acme_task_log_dao.go
- acme_task_log_model.go
- acme_task_log_model_ext.go
- acme_task_model.go
- acme_task_model_ext.go
- acme_user_dao.go
- acme_user_model.go
- acme_user_model_ext.go