kaz

package
v0.0.0-...-15e31a4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TeamFoldersPrefix string = "CDC"
	TeamVMPrefix      string = "Team"
	RootFolder        string = "Competition Folder"
)
View Source
const (
	Release string = gin.ReleaseMode
	Debug   string = gin.DebugMode
)
View Source
const ChunkSize = 4
View Source
const DatabaseName string = "kaz.db"

Variables

View Source
var (
	FoldersIds         = make(map[string]string)
	VirtualMachinesIds = make(map[string]string)
	//VirtualMachineNetworkIds  = make(map[string][]int)
	VirtualMachineNetworkMacs = make(map[string]string)
)

Functions

func ChunkSlice

func ChunkSlice(slice []Client, size int) [][]Client

func CommitClient

func CommitClient(c *Client, s *Server) error

func InitializeCache

func InitializeCache(override bool) error

func InitializeDatabase

func InitializeDatabase(s *Server) error

func Send

func Send(u url.URL, sessionToken string) ([]byte, error)

Types

type Client

type Client struct {
	VMWareName string
	VMWareId   string `gorm:"unique;not null"`
	MacAddress string `gorm:"unique;not null"`
	Team       int
	Group      Group
	CheckedIn  bool `gorm:"unique;not null;default:false"`
	gorm.Model
}

func GetClientByMacAddress

func GetClientByMacAddress(address string) (*Client, error)

type Group

type Group struct {
	Name string
	Tags []string
}

type Server

type Server struct {
	Port        int
	Address     string
	ReleaseMode string
	Engine      *gin.Engine
	Logger      *log.Logger
	Db          *gorm.DB
}

func (*Server) Run

func (s *Server) Run()

Jump to

Keyboard shortcuts

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