utilities

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = NewConf()
View Source
var DB = CreateDB()

Functions

func Compare

func Compare(hash string, password string) bool

Compare hash with password

func CreateDB

func CreateDB() *gorm.DB

func CreateNewJWT

func CreateNewJWT(UserID uint) (string, error)

func GetTokenSecret

func GetTokenSecret() string

func Hash

func Hash(password string) (string, error)

Hash password

func ParseToken

func ParseToken(t string) (map[string]interface{}, error)

Types

type AppConfig

type AppConfig struct {
	Port int
	*pg_conf.PostgresConfig
}

func NewConf

func NewConf() *AppConfig

type Seeder

type Seeder struct{}

func (*Seeder) CreateRoles

func (s *Seeder) CreateRoles(y *yamlScheme)

func (*Seeder) CreateUser

func (s *Seeder) CreateUser(y *yamlScheme)

type TokenClaims

type TokenClaims struct {
	jwt.RegisteredClaims
}

type Yaml

type Yaml struct {
	Yaml yamlScheme
	// contains filtered or unexported fields
}

func NewYaml

func NewYaml() *Yaml

func (*Yaml) Do

func (y *Yaml) Do() error

func (*Yaml) Get

func (y *Yaml) Get(fileName string)

Jump to

Keyboard shortcuts

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