setupData

package
v0.0.0-...-0b10f05 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Data      *SetupData
	Active    bool = false
	BaseID    string
	ServiceID uint64
	Port      uint32 = 50001
)

Functions

func FreeTCPPort

func FreeTCPPort() net.Listener

Types

type AdminPathItem

type AdminPathItem struct {
	Path        string
	PostAllowed bool
	GetDisabled bool
	Call        PageFunc
}

type EmbedInterface

type EmbedInterface interface {
	Open(name string) (fs.File, error)
	ReadFile(name string) ([]byte, error)
}

type PageFunc

type PageFunc = func(in *structs.WebRequest) (*structs.WebReturn, error)

type PathItem

type PathItem struct {
	Path        string
	Permission  string
	PostAllowed bool
	GetDisabled bool
	Call        PageFunc
}

type SetupData

type SetupData struct {
	ServiceName      string
	ServiceType      string
	Version          structs.Version
	Multi            bool
	SingleRun        bool
	StartActive      bool
	NavItems         []*pb.NavItem
	ConfigItems      []*pb.ConfigItem
	RequiredServices []*pb.RequiredService
	Groups           []string
	Permissions      []string
	VerboseLog       bool
	GRPCSystems      func(server *grpc.Server)

	StaticFS            EmbedInterface
	AdminPaths          []*AdminPathItem
	Paths               []*PathItem
	Sockets             []*SocketItem
	TaskGrabber         func() []*pbw.TaskMessage
	NotificationGrabber func() []*pbw.NotificationMessage
	MainSetup           func()
	MainSystem          func()
	MainShutdown        func()
	// contains filtered or unexported fields
}

func (*SetupData) AdminPathsToProtos

func (d *SetupData) AdminPathsToProtos() []*pb.AdminWebLinkItem

func (*SetupData) Filename

func (d *SetupData) Filename(extension string) string

func (*SetupData) GetAdminPath

func (d *SetupData) GetAdminPath(path string) *AdminPathItem

func (*SetupData) GetPath

func (d *SetupData) GetPath(path string) *PathItem

func (*SetupData) GetSocket

func (d *SetupData) GetSocket(command string) *SocketItem

func (*SetupData) Name

func (d *SetupData) Name() string

func (*SetupData) PathsToProtos

func (d *SetupData) PathsToProtos() []*pb.WebLinkItem

func (*SetupData) RegisterProto

func (d *SetupData) RegisterProto() *pb.RegisterRequest

func (*SetupData) SocketsToProtos

func (d *SetupData) SocketsToProtos() []*pb.WebSocketItem

func (*SetupData) URL

func (d *SetupData) URL() string

type SocketFunc

type SocketFunc = func(in *structs.SocketRequest) (*structs.SocketReturn, error)

type SocketItem

type SocketItem struct {
	Command           string
	Permission        string
	AdminOnly         bool
	RequiredVariables []string
	Call              SocketFunc
}

Jump to

Keyboard shortcuts

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