Documentation ¶
Index ¶
- Constants
- func GetCredsURL(ctx context.Context) string
- func GetFrom(ctx context.Context) string
- func GetHost(ctx context.Context) string
- func GetMint(ctx context.Context) string
- func GetPort(ctx context.Context) string
- func GetSMTP(ctx context.Context) (*smtp.Auth, string)
- type CredentialsResource
- type UserResource
- type UsrStatus
Constants ¶
View Source
const ( // EnvCfgHost is the env config key for the register host. EnvCfgHost env.ConfigKey = "host" // EnvCfgPort is the port on which to run the register. EnvCfgPort env.ConfigKey = "port" // EnvCfgCredsURL is the URL that is sent to the user over email to // retrieve their credentials. EnvCfgCredsURL env.ConfigKey = "credentials_url" // EnvCfgMint is the env config key for the mint this register service is // bound to. EnvCfgMint env.ConfigKey = "mint" // EnvCfgSMTPLogin is the env config key for the SMTP login to use to send // verification emails. EnvCfgSMTPLogin env.ConfigKey = "smtp_login" // EnvCfgSMTPPassword is the env config key for the SMTP password to use to // send verification emails. EnvCfgSMTPPassword env.ConfigKey = "smtp_password" // EnvCfgSMTPHost is the env config key for the SMTP host to use to send // verification emails. EnvCfgSMTPHost env.ConfigKey = "smtp_host" // EnvCfgFrom is the email address to send registration emails from. EnvCfgFrom env.ConfigKey = "from" )
View Source
const ( // Version is the current protocol version. Version string = "0" // TimeResolutionNs is the resolution of our time variables in nanoseconds // (aka resolution in milliseconds). TimeResolutionNs int64 = 1000 * 1000 )
Variables ¶
This section is empty.
Functions ¶
func GetCredsURL ¶
GetCredsURL retrieves the credentials URL for users to retrieve their credentials.
Types ¶
type CredentialsResource ¶
type CredentialsResource struct { Address string `json:"address"` Password string `json:"password"` }
CredentialsResource is the representation of user credentials.
type UserResource ¶
type UserResource struct { ID string `json:"id"` Created int64 `json:"created"` Status UsrStatus `json:"status"` Username string `json:"username"` Email string `json:"email"` Credentials *CredentialsResource `json:"credentials"` }
UserResource is the representation of a user in the register API.
Click to show internal directories.
Click to hide internal directories.