config

package
v0.0.0-...-c7114d0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: AGPL-3.0 Imports: 13 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

type Space

type Space struct {
	Base
	Name           string `gorm:"column:name" json:"name"`
	OrganisationID int    `gorm:"column:organisation_id" json:"organisation_id"`
}

Space model

type SpacePermission

type SpacePermission struct {
	Base
	SpaceID uint  `gorm:"column:space_id" json:"space_id"`
	Charts  int64 `gorm:"column:charts" json:"charts"`
}

SpacePermission model

Jump to

Keyboard shortcuts

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