data

package
v0.1.0-2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccessTokenDatabaseDs

func NewAccessTokenDatabaseDs(queries *database.Queries) domain.AccessTokenDatabaseDs

func NewAccessTokenTokenCacheDs

func NewAccessTokenTokenCacheDs(redis *redis.Client) domain.AccessTokenCacheDs

func NewBcryptHashDatasource

func NewBcryptHashDatasource() domain.HashDatasource

func NewNoteCacheDs

func NewNoteCacheDs(redis *redis.Client) domain.NoteCacheDs

func NewNoteDatabaseDs

func NewNoteDatabaseDs(queries *database.Queries) domain.NoteDatabaseDs

func NewRefreshTokenCacheDs

func NewRefreshTokenCacheDs(redis *redis.Client) domain.RefreshTokenCacheDs

func NewRefreshTokenDatabaseDs

func NewRefreshTokenDatabaseDs(queries *database.Queries) domain.RefreshTokenDatabaseDs

func NewUserCacheDs

func NewUserCacheDs(redis *redis.Client) domain.UserCacheDs

func NewUserDatabaseDs

func NewUserDatabaseDs(queries *database.Queries) domain.UserDatabaseDs

Types

type AccessToken

type AccessToken struct {
	Id             string    `redis:"id"`
	RefreshTokenId string    `redis:"refresh_token_id"`
	UserId         string    `redis:"user_id"`
	CreateTime     time.Time `redis:"create_time"`
	UpdateTime     time.Time `redis:"update_time"`
}

func (*AccessToken) ParseToDomain

func (u *AccessToken) ParseToDomain() (*domain.AccessToken, error)

type Note

type Note struct {
	Id         string    `redis:"id"`
	UserId     string    `redis:"user_id"`
	Title      string    `redis:"title"`
	Content    string    `redis:"content"`
	CreateTime time.Time `redis:"create_time"`
	UpdateTime time.Time `redis:"update_time"`
	DeleteTime time.Time `redis:"delete_time"`
}

type RefreshToken

type RefreshToken struct {
	Id         string    `redis:"id"`
	UserId     string    `redis:"user_id"`
	CreateTime time.Time `redis:"create_time"`
	UpdateTime time.Time `redis:"update_time"`
}

func (*RefreshToken) ParseToDomain

func (u *RefreshToken) ParseToDomain() *domain.RefreshToken

type User

type User struct {
	Id         string    `redis:"id"`
	Name       string    `redis:"name"`
	Email      string    `redis:"email"`
	Password   string    `redis:"password"`
	CreateTime time.Time `redis:"create_time"`
	UpdateTime time.Time `redis:"update_time"`
}

func (*User) ParseToDomain

func (u *User) ParseToDomain() *domain.User

Jump to

Keyboard shortcuts

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