models

package
v0.0.0-...-77d14a5 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorTypeFatal        = "Fatal"
	ErrorTypeError        = "Error"
	ErrorTypeValidation   = "Validation Error"
	ErrorTypeInfo         = "Info"
	ErrorTypeDebug        = "Debug"
	ErrorTypeUnauthorized = "Unauthorized"
)

Variables

This section is empty.

Functions

func GetFlags

func GetFlags() (*Flags, *ErrorDetail)

Types

type ErrorDetail

type ErrorDetail struct {
	ErrorType    string
	ErrorMessage string
}

func (*ErrorDetail) Error

func (err *ErrorDetail) Error() string

type Flags

type Flags struct {
	Ip   string
	Port string
}

func NewFlags

func NewFlags(ip, port string) *Flags

func (*Flags) GetApplicationUrl

func (f *Flags) GetApplicationUrl() (*string, *ErrorDetail)

type JwtClaims

type JwtClaims struct {
	ComapnyId string `json:"comapnyId,omitempty"`
	Username  string `json:"username,omitempty"`
	Roles     []int  `json:"roles,omitempty"`
	jwt.StandardClaims
}

func (JwtClaims) Valid

func (claims JwtClaims) Valid() error

func (JwtClaims) VerifyAudience

func (claims JwtClaims) VerifyAudience(origin string) bool

type LoginRequest

type LoginRequest struct {
	UserName   string `json:"UserName" form:"UserName" binding:"required"`
	Password   string `json:"Password" form:"Password" binding:"required"`
	RememberMe bool   `json:"RememberMe" form:"RememberMe"`
}

type Response

type Response struct {
	Data    interface{}
	Status  int
	Error   []ErrorDetail
	Message string
}

type User

type User struct {
	Id       int
	Name     string
	UserName string
	Password string
	Roles    []int
}

Jump to

Keyboard shortcuts

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