configuration

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load()

Load tries to read from config.json file a valid JSON with all settings

Types

type Configuration

type Configuration struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Address     string   `json:"address"`
	SecretKey   string   `json:"jwt_secret_key"`
	Database    database `json:"database"`
}

Configuration main configuration struct

func Get

func Get() *Configuration

Get get data of configurations

type Session

type Session struct {
	Name       *string    `json:"name,omitempty"`
	Email      *string    `json:"email,omitempty"`
	Permission *UserLevel `json:"permission,omitempty"`
	jwt.StandardClaims
}

type UserLevel

type UserLevel struct {
	IsAdmin *bool   `json:"is_admin,omitempty"`
	ID      *int64  `json:"id,omitempty"`
	Name    *string `json:"name,omitempty"`
}

UserLevel permission model of user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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