Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BCryptPasswordHasher ¶
type BCryptPasswordHasher struct{}
type CommandSessionHttpCreate ¶
type CommandSessionHttpCreate struct { UsedId int64 UserEmail string IpAddr net.IP UserAgent string Result struct { Session domain.Session Token domain.SessionHttpToken } }
func (*CommandSessionHttpCreate) IsValid ¶
func (c *CommandSessionHttpCreate) IsValid() bool
func (*CommandSessionHttpCreate) Reset ¶
func (c *CommandSessionHttpCreate) Reset()
type CommandUserCreate ¶
type CommandUserCreate struct { Email string Surname string GivenNames string Password string Result domain.User }
func (*CommandUserCreate) IsValid ¶
func (c *CommandUserCreate) IsValid() bool
func (*CommandUserCreate) Reset ¶
func (c *CommandUserCreate) Reset()
type DriverSession ¶
type DriverSession interface { // CreateHttp create a new http session for the given user. // IpAddr and UserAgent must be derived from the http request. // Any error occured must be considered internal. CreateHttp(create *CommandSessionHttpCreate) error // DecodeHttpTokenTo decodes and validates the http session token. // Errors: // domain.ErrValue - token can't be decoded or verified; // domain.ErrExpired - token has expired; // domain.ErrSessionTerminated - token had been revoked; // other - internal. DecodeHttpTokenTo(dst *domain.SessionHttpToken, src []byte) error }
type DriverTextNQ ¶
type DriverTextNQ interface { // Submit the text message for delivery. Returns whether the message // will be processed shortly or not (depends on a queue load). // Only reports render errors. Submit(renderFn DriverTextNSRenderFn, deliverFn DriverTextNSDeliverFn) (shortly bool, errRender error) }
type DriverTextNSDeliverFn ¶
type DriverTextNSRenderFn ¶
type DriverUser ¶
type DriverUser interface { // Create creates a new user from the given data. // Errors: // domain.ErrExists - user exists; // other - internal. Create(*CommandUserCreate) error }
type PasswordHasher ¶
type RepositorySession ¶
type RepositorySession interface { // Create creates the session and replaces its Id, CreatedAt and ExpiresAt. // Any error occurred must be interpreted as internal. Create(*domain.Session) error // IsTerminated returns whether the session had been terminated or not. // The given buffer will be used to convert sessionId to bytes. // Any error occurred must be interpreted as internal. IsTerminated(sessionId int64, buf []byte) (bool, error) }
type RepositoryUser ¶
Click to show internal directories.
Click to hide internal directories.