config

package
v0.0.0-...-035f8e2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WorkDir = envs.GetEnvWithPrefix("WORKDIR", func() string {
	dir, err := os.UserHomeDir()
	if err != nil || dir == "" {
		return path.Join(os.TempDir(), consts.ProjectName)
	}
	return path.Join(dir, "."+consts.ProjectName)
}())

Functions

func InitFlags

func InitFlags(ctx context.Context, flags *pflag.FlagSet) (context.Context, error)

InitFlags initializes the flags for the configuration.

func Load

func Load(ctx context.Context, path ...string) ([]any, error)

Load loads the given path into the context.

Types

type Driver

type Driver struct {
	Mysql *repository.MysqlDriver
	Neo4j *repository.Neo4jDriver
}

type GitlabConfig

type GitlabConfig struct {
	PrivateToken   string
	GitlabUrl      string
	GitlabUsername string
	WorkspaceDir   string
}

type IntOrUndefined

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

IntOrUndefined holds the value of a flag of type `int`, that's by default `undefined`. We use this instead of just `int` to differentiate `undefined` and `zero` values.

func NewIntOrUndefined

func NewIntOrUndefined(v *int) IntOrUndefined

func (*IntOrUndefined) Set

func (s *IntOrUndefined) Set(v string) error

func (*IntOrUndefined) SetNil

func (s *IntOrUndefined) SetNil() error

func (*IntOrUndefined) String

func (s *IntOrUndefined) String() string

func (*IntOrUndefined) Type

func (s *IntOrUndefined) Type() string

func (*IntOrUndefined) Value

func (s *IntOrUndefined) Value() *int

type NebulaeOptions

type NebulaeOptions struct {
	EnableRPC   bool
	RPCPort     int
	RPCHTTPPort int
	Driver      *Driver
	Gitlab      *GitlabConfig
}

Jump to

Keyboard shortcuts

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