Documentation ¶
Index ¶
- Variables
- type AccessDetails
- type AuthHandler
- type AuthService
- type MysqlClient
- type Product
- type ProductDTO
- type ProductHandler
- type ProductRepository
- type ProductService
- type RedisClient
- type TokenDetails
- type User
- type UserDTO
- type UserHandler
- type UserHandlerDynamoDb
- type UserRepository
- type UserRepositoryCtx
- type UserService
- type UserServiceDynamoDb
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AccessDetails ¶
type AuthHandler ¶
type AuthService ¶
type AuthService interface { ValidateToken(r *http.Request) (*jwt.Token, error) TokenValid(r *http.Request) error CreateToken(userid uint) (*TokenDetails, error) CreateAuth(userid uint, td *TokenDetails) error DeleteTokens(authD *AccessDetails) error ExtractTokenMetadata(r *http.Request) (*AccessDetails, error) FetchAuth(authD *AccessDetails) (uint64, error) DeleteAuth(givenUuid string) (int64, error) }
type MysqlClient ¶
type Product ¶
type Product struct { gorm.Model Name string `json:"name" validate:"required,min=2,max=45"` Price float32 `json:"price" validate:"required"` Description string `json:"description" validate:"required"` }
swagger:model Product
func ToProduct ¶
func ToProduct(productDTO ProductDTO) Product
type ProductDTO ¶
type ProductDTO struct { ID uint `json:"id,string,omitempty"` Name string `json:"name" validate:"required,min=2,max=45"` Price float32 `json:"price" validate:"required"` Description string `json:"description" validate:"required"` }
swagger:model ProductDTO
func ToProductDTO ¶
func ToProductDTO(product Product) ProductDTO
func ToProductDTOs ¶
func ToProductDTOs(products []Product) []ProductDTO
type ProductHandler ¶
type ProductRepository ¶
type ProductService ¶
type RedisClient ¶
type RedisClient interface {
GetClient() *redis.Client
}
type TokenDetails ¶
type User ¶
type User struct { gorm.Model Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required"` }
swagger:model User
type UserDTO ¶
type UserDTO struct { ID uint `json:"id,string,omitempty"` Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required"` }
swagger:model UserDTO
func ToUserDTOs ¶
type UserHandler ¶
type UserHandlerDynamoDb ¶
type UserRepository ¶
type UserRepositoryCtx ¶
type UserService ¶
Click to show internal directories.
Click to hide internal directories.