ad

package
v0.0.0-...-325c27a Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveD

func ActiveD() bool

func Breakout

func Breakout(msg string, quiet bool)

func ConfigIf

func ConfigIf(n int) bool

func ConfigIsActiveD

func ConfigIsActiveD() bool

func ConfigVerbosity

func ConfigVerbosity() int

func DoX

func DoX() bool

func FeatureFlag

func FeatureFlag(flag string) bool

func IsProd

func IsProd() bool

func LogApis

func LogApis() bool

func MustNot

func MustNot(err error)

func OnFeatureFlag

func OnFeatureFlag(flag string, fn func() error) error

func Verbosity

func Verbosity() int

Types

type ActiveDevelopment

type ActiveDevelopment struct {
	App *Application
	Cfg *Config
}

func NewActiveDevelopment

func NewActiveDevelopment(appName string) *ActiveDevelopment

func NewActiveDevelopmentWithFeedback

func NewActiveDevelopmentWithFeedback(appName string) *ActiveDevelopment

func (*ActiveDevelopment) SetActiveD

func (ad *ActiveDevelopment) SetActiveD(isAD bool)

func (*ActiveDevelopment) SetDoX

func (ad *ActiveDevelopment) SetDoX(isDOX bool)

func (*ActiveDevelopment) SetLogApis

func (ad *ActiveDevelopment) SetLogApis(isLogApis bool)

func (*ActiveDevelopment) SetVerbosity

func (ad *ActiveDevelopment) SetVerbosity(level int)

func (*ActiveDevelopment) String

func (ad *ActiveDevelopment) String() string

type Application

type Application struct {
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication(name string) *Application

func NewApplicationWithFeedback

func NewApplicationWithFeedback(name string) *Application

func (*Application) CloseConnection

func (app *Application) CloseConnection() error

func (*Application) Feedback

func (app *Application) Feedback(msg *osc.Message) error

func (*Application) RegisterDefaultHandler

func (app *Application) RegisterDefaultHandler(handler osc.HandlerFunc) (string, error)

func (*Application) RegisterSubVariable

func (app *Application) RegisterSubVariable(sub, name string, handler osc.HandlerFunc) (string, error)

func (*Application) RegisterVariable

func (app *Application) RegisterVariable(name string, handler osc.HandlerFunc) (string, error)

func (*Application) Start

func (app *Application) Start(ip string, port int) error

func (*Application) StartBlocking

func (app *Application) StartBlocking(ip string, port int) error

type Config

type Config struct {
	IsActiveDevelopment bool
	IsShowDebug         bool
	IsLogApis           bool
	VerbosityLevel      int
	IsDoX               bool

	FeatureFlags  map[string]struct{}
	FeatureTags   map[string]string
	FeatureTagsEx map[string]interface{}
}
var TheConfig *Config

func NewConfig

func NewConfig() *Config

func (*Config) DoX

func (c *Config) DoX() bool

func (*Config) FeatureFlag

func (c *Config) FeatureFlag(flag string) bool

func (*Config) If

func (c *Config) If(n int) bool

func (*Config) IsActiveD

func (c *Config) IsActiveD() bool

func (*Config) IsProd

func (c *Config) IsProd() bool

func (*Config) LogApis

func (c *Config) LogApis() bool

func (*Config) OnFeatureFlag

func (c *Config) OnFeatureFlag(flag string, fn func() error) error

func (*Config) SetActiveD

func (c *Config) SetActiveD(isAD bool)

func (*Config) SetDoX

func (c *Config) SetDoX(isDOX bool)

func (*Config) SetLogApis

func (c *Config) SetLogApis(isLogApis bool)

func (*Config) SetReleaseMode

func (c *Config) SetReleaseMode()

func (*Config) SetVerbosity

func (c *Config) SetVerbosity(level int)

func (*Config) Verbosity

func (c *Config) Verbosity() int

type DebugOptions

type DebugOptions struct {
	VerboseLevel int
}
var Debug DebugOptions

type DynamicConfig

type DynamicConfig struct {
	Data map[string]string
	// contains filtered or unexported fields
}

func (*DynamicConfig) Get

func (dy *DynamicConfig) Get(key string) string

func (*DynamicConfig) GetFloat64

func (dy *DynamicConfig) GetFloat64(key string) (float64, error)

func (*DynamicConfig) MakeFloat64IncDecActions

func (dy *DynamicConfig) MakeFloat64IncDecActions(key, incName, decName string, delta float64)

func (*DynamicConfig) MakeFloat64IncFn

func (dy *DynamicConfig) MakeFloat64IncFn(key string, delta float64) func()

func (*DynamicConfig) Set

func (dy *DynamicConfig) Set(key, value string)

func (*DynamicConfig) SetFloat64

func (dy *DynamicConfig) SetFloat64(key string, value float64)

Directories

Path Synopsis
verbose
v
vv
vvv

Jump to

Keyboard shortcuts

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