logins

package
v0.0.0-...-24ccd8c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtToken

type JwtToken struct {
	Token        string    `bson:"token,omitempty"`
	RefreshToken string    `bson:"refresh_token,omitempty"`
	Status       string    `bson:"status,omitempty"`
	CreatedAt    time.Time `bson:"created_at,omitempty"`
	ExpiredAt    time.Time `bson:"expired_at,omitempty"`
	UpdatedAt    time.Time `bson:"updated_at,omitempty"`
}

JwtToken struct

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store struct manages interactions with login store

func New

func New(db *mongo.Client) *Store

New creates a new Store struct

func (*Store) LoginUser

func (s *Store) LoginUser(ctx context.Context, login *domain.Login) (*domain.JwtToken, error)

LoginUser method to update token user in repository mongo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL