Documentation ¶
Index ¶
- Constants
- func Init(cfg *Config)
- type Community
- type Config
- type CorpSigning
- func (cs *CorpSigning) AddEmailDomain(email dp.EmailAddr) error
- func (cs *CorpSigning) AddManagers(managers []Manager) error
- func (cs *CorpSigning) EmailDomains() []string
- func (cs *CorpSigning) GetRole(a dp.Account) string
- func (cs *CorpSigning) IsSameCorp(email dp.EmailAddr) bool
- func (cs *CorpSigning) RemoveManagers(managers []dp.Account) error
- type Corporation
- type EmployeeSigning
- type IndividualSigning
- type Link
- type Manager
- type Representative
- type SigningIndex
- type User
- type VerificationCode
- type VerificationCodeKey
Constants ¶
View Source
const ( RoleAdmin = "admin" RoleManager = "manager" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { VerificationCodeExpiry int64 `json:"verification_code_expiry"` MaxNumOfEmployeeManager int `json:"max_num_of_employee_manager"` MinNumOfSameEmailDomainParts int `json:"min_num_of_same_email_domain_parts"` }
func (*Config) SetDefault ¶
func (cfg *Config) SetDefault()
type CorpSigning ¶
type CorpSigning struct { Id string PDF string Date int64 Link Link Admin Manager Managers []Manager Corporation Corporation Representative Representative Version int }
func (*CorpSigning) AddEmailDomain ¶
func (cs *CorpSigning) AddEmailDomain(email dp.EmailAddr) error
func (*CorpSigning) AddManagers ¶
func (cs *CorpSigning) AddManagers(managers []Manager) error
func (*CorpSigning) EmailDomains ¶
func (cs *CorpSigning) EmailDomains() []string
func (*CorpSigning) IsSameCorp ¶
func (cs *CorpSigning) IsSameCorp(email dp.EmailAddr) bool
func (*CorpSigning) RemoveManagers ¶
func (cs *CorpSigning) RemoveManagers(managers []dp.Account) error
type Corporation ¶
type EmployeeSigning ¶
type EmployeeSigning struct { IndividualSigning Enabled bool CorpSigningId string }
func (*EmployeeSigning) ChangeEnabled ¶
func (es *EmployeeSigning) ChangeEnabled(b bool) bool
func (*EmployeeSigning) Remove ¶
func (es *EmployeeSigning) Remove() error
type IndividualSigning ¶
type SigningIndex ¶
type User ¶
type User struct { Email dp.EmailAddr Account dp.Account Password string CorpSigningId string PasswordChaged bool }
func (*User) ChangePassword ¶
type VerificationCode ¶
type VerificationCode struct { VerificationCodeKey Expiry int64 }
func NewVerificationCode ¶
func NewVerificationCode(code string, Purpose dp.Purpose) VerificationCode
func (*VerificationCode) IsExpired ¶
func (vc *VerificationCode) IsExpired() bool
type VerificationCodeKey ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.