Documentation ¶
Index ¶
- func NewTxGoogleSignin(req *pb.GoogleSigninRequest) transaction.Tx
- func NewTxLogin(req *pb.LoginRequest) transaction.Tx
- func NewTxLogout(req *pb.LogoutRequest) transaction.Tx
- func NewTxSignup(req *pb.SignupRequest) transaction.Tx
- func SetupDummyUser() (err error)
- type TxGoogleSignin
- type TxLogin
- type TxLogout
- type TxSignup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTxGoogleSignin ¶
func NewTxGoogleSignin(req *pb.GoogleSigninRequest) transaction.Tx
NewTxGoogleSignin builds a brand new instance of TxGoogleLogin
func NewTxLogin ¶
func NewTxLogin(req *pb.LoginRequest) transaction.Tx
NewTxLogin builds a brand new instance of TxLogin
func NewTxLogout ¶
func NewTxLogout(req *pb.LogoutRequest) transaction.Tx
NewTxLogout builds a brand new instance of TxLogout
func NewTxSignup ¶
func NewTxSignup(req *pb.SignupRequest) transaction.Tx
NewTxSignup builds a brand new instance of TxSignup
func SetupDummyUser ¶
func SetupDummyUser() (err error)
SetupDummyUser inits a dummy user for testing
Types ¶
type TxGoogleSignin ¶
type TxGoogleSignin struct {
// contains filtered or unexported fields
}
TxGoogleSignin represents an
func (*TxGoogleSignin) Commit ¶
func (tx *TxGoogleSignin) Commit() (err error)
Commit commits the session and make its alive.
func (*TxGoogleSignin) Postcondition ¶
func (tx *TxGoogleSignin) Postcondition(ctx context.Context) (resp interface{}, err error)
Postcondition creates a new session or update the latest one for a provided user, if exists.
func (*TxGoogleSignin) Precondition ¶
func (tx *TxGoogleSignin) Precondition() (err error)
Precondition validates the transaction is ready to run. That means it does validates all parameters and connection requirements to make sure the transaction has chances of commit.
func (*TxGoogleSignin) Rollback ¶
func (tx *TxGoogleSignin) Rollback()
Rollback the session in order to make it non existence
type TxLogin ¶
type TxLogin struct {
// contains filtered or unexported fields
}
TxLogin represents an
func (*TxLogin) Postcondition ¶
Postcondition creates a new session or update the latest one for a provided user, if exists.
func (*TxLogin) Precondition ¶
Precondition validates the transaction is ready to run. That means it does validates all parameters and connection requirements to make sure the transaction has chances of commit.
type TxLogout ¶
type TxLogout struct {
// contains filtered or unexported fields
}
TxLogout represents an
func (*TxLogout) Postcondition ¶
Postcondition kills the provided session and all them related to the same user
func (*TxLogout) Precondition ¶
Precondition validates the transaction is ready to run. That means making sure the session exists.
type TxSignup ¶
type TxSignup struct {
// contains filtered or unexported fields
}
TxSignup represents an
func (*TxSignup) Postcondition ¶
Postcondition creates new user and a opens its first session
func (*TxSignup) Precondition ¶
Precondition validates the transaction is ready to run