models

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TypePersonalAccessToken = "pat"
	TypeAccessToken         = "login"
)

Functions

This section is empty.

Types

type Auth

type Auth struct {
	AuthPure
	apimodels.ModelCU
}

type AuthPure

type AuthPure struct {
	Name    string            `json:"name" gorm:"unique;uniqueIndex;not null" example:"jira-deepcore"`
	Headers datatypes.JSONMap `json:"headers" swaggertype:"object,string" example:"Content-Type:application/json"`
	Data    string            `json:"data" example:"any data"`
	apimodels.Groups
}

type Control

type Control struct {
	ControlPureContent
	apimodels.ModelCU
}

type ControlClone

type ControlClone struct {
	Name    string `json:"name" swaggertype:"string"`
	NewName string `json:"new_name" swaggertype:"string"`
}

type ControlEndpoint

type ControlEndpoint struct {
	Methods []string `json:"methods"`
	Public  bool     `json:"public"`
}

ControlEndpoint is representation of Endpoints json object.

type ControlPure

type ControlPure struct {
	Name string `json:"name" gorm:"unique;uniqueIndex;not null"`
	Endpoints
	apimodels.Groups
}

type ControlPureContent

type ControlPureContent struct {
	Content string `json:"content" swaggertype:"string" format:"base64" example:"aGVsbG8ge3submFtZX19Cg=="`
	ControlPure
}

type Email

type Email struct {
	Host     string `json:"host"`
	Email    string `json:"email"`
	Port     string `json:"port"`
	NoAuth   bool   `json:"no_auth"`
	Password string `json:"password"`
}

type Endpoints

type Endpoints struct {
	Endpoints datatypes.JSON `json:"endpoints" swaggertype:"object,string"`
}

type Folder

type Folder struct {
	FolderPure
	apimodels.ID
}

type FolderPure

type FolderPure struct {
	Folder string `json:"folder" example:"deepcore/"`
	Item   string `json:"item" example:"template1" gorm:"not null"`
	Name   string `json:"name" example:"deepcore/template1" gorm:"uniqueIndex;not null"`
	Dtype  bool   `json:"dtype" gorm:"default:false"`
}

type Group

type Group struct {
	GroupPure
	apimodels.ModelCU
}

type GroupPure

type GroupPure struct {
	Name string `json:"name" gorm:"uniqueIndex;not null"`
}

type Settings

type Settings struct {
	apimodels.ModelCUPure
	SettingsPure
}

type SettingsPure

type SettingsPure struct {
	Name      string            `json:"name" gorm:"uniqueIndex:idx_name_namespace" example:"email-1"`
	Namespace string            `json:"namespace" gorm:"uniqueIndex:idx_name_namespace;not null" example:"email"`
	Data      datatypes.JSONMap `json:"data" swaggertype:"object,string"`
}

type Template

type Template struct {
	TemplatePure
	apimodels.ModelCU
}

type TemplatePure

type TemplatePure struct {
	Name    string `json:"name" gorm:"uniqueIndex;not null" example:"deepcore/template1"`
	Content string `json:"content" swaggertype:"string" format:"base64" example:"aGVsbG8ge3submFtZX19Cg=="`
	apimodels.Groups
}

type Test

type Test struct {
	gorm.Model
	TestPure
}

type TestPure

type TestPure struct {
	Name string `json:"name" gorm:"uniqueIndex;not null" example:"userX"`
}

type Token

type Token struct {
	apimodels.ModelC
	TokenPure
}

type TokenData

type TokenData struct {
	Name string     `json:"name" example:"mytoken" gorm:"not null;default:null"`
	Date *time.Time `json:"date" example:"2021-02-18T21:54:42.123Z"`
	apimodels.Groups
}

type TokenDataBy

type TokenDataBy struct {
	TokenData
	CreatedBy uuid.UUID `json:"createdby" gorm:"not null;type:uuid" example:"cf8a07d4-077e-402e-a46b-ac0ed50989ec"`
}

type TokenPrivate

type TokenPrivate struct {
	Token string `json:"token" gorm:"primarykey" example:"tokenJWT"`
}

type TokenPure

type TokenPure struct {
	TokenPrivate
	TokenDataBy
}

type User

type User struct {
	UserPure
	apimodels.ModelCU
}

type UserData

type UserData struct {
	Name  string `json:"name" gorm:"unique;uniqueIndex;not null" example:"userX"`
	Email string `json:"email" example:"userx@example.com"`
	apimodels.Groups
}

type UserPrivate

type UserPrivate struct {
	Password string `json:"password" gorm:"not null" example:"pass1234"`
}

type UserPure

type UserPure struct {
	UserPrivate
	UserData
}

type UserRequest

type UserRequest struct {
	Name     null.String `json:"name"`
	Email    null.String `json:"email"`
	Groups   []string    `json:"groups"`
	Password null.String `json:"password"`
	ID       string      `json:"id"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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