config

package
v0.0.0-...-be294a2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

DB - gorm DB

Functions

func CheckSuperOrganisation

func CheckSuperOrganisation() bool

CheckSuperOrganisation checks if super organisation is present in kavach or not

func CreateSuperOrganisation

func CreateSuperOrganisation() error

CreateSuperOrganisation creates a super user and organisation in kavach

func SetupDB

func SetupDB()

SetupDB is database setuo

func SetupVars

func SetupVars()

SetupVars setups all the config variables to run application

func UserConfigPresent

func UserConfigPresent() bool

UserConfigPresent checks if user config params is present in config file

Types

type Base

type Base struct {
	ID          uint            `gorm:"primary_key" json:"id"`
	CreatedAt   time.Time       `json:"created_at"`
	UpdatedAt   time.Time       `json:"updated_at"`
	DeletedAt   *gorm.DeletedAt `sql:"index" json:"deleted_at" swaggertype:"primitive,string"`
	CreatedByID uint            `gorm:"column:created_by_id" json:"created_by_id"`
	UpdatedByID uint            `gorm:"column:updated_by_id" json:"updated_by_id"`
}

Base with id, created_at, updated_at & deleted_at

type ContextKey

type ContextKey string

ContextKey keys for contexts

type OrganisationPermission

type OrganisationPermission struct {
	Base
	OrganisationID uint  `gorm:"column:organisation_id" json:"organisation_id"`
	Spaces         int64 `gorm:"column:spaces" json:"spaces"`
}

OrganisationPermission model

Jump to

Keyboard shortcuts

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