config

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullURL

func FullURL() string

func InitConfig

func InitConfig() error

Types

type Configuration

type Configuration struct {
	Tokens map[string]*Token
	Server *ServerConfig
}
var Config *Configuration

func (*Configuration) Token

func (c *Configuration) Token(instance string) *Token

type DataConfig

type DataConfig struct {
	Tmp      bool   `ini:"TMP"`
	Location string `ini:"LOCATION"`
	Keep     bool   `ini:"KEEP"`
}

type ServerConfig

type ServerConfig struct {
	Domain          string `ini:"DOMAIN"`
	Port            int    `ini:"PORT"`
	DebugMode       bool   `ini:"DEBUG_MODE"`
	Secret          string `ini:"SECRET"`
	AllowPush       bool   `ini:"ALLOW_PUSH"`
	AllowPR         bool   `ini:"ALLOW_PR"`
	TLSMode         string `ini:"TLS_MODE"`
	TLSCert         string `ini:"TLS_CERT"`
	TLSPriv         string `ini:"TLS_PRIV"`
	StatusContext   string `ini:"STATUS_CONTEXT"`
	StatusContextPR string `ini:"STATUS_CONTEXT_PR"`
	Skip            string `ini:"SKIP"`
	Owner           string `ini:"OWNER"`
	Repo            string `ini:"REPO"`
}

type Token

type Token struct {
	Instance string
	Username string
	Token    string
}

func (*Token) Git

func (t *Token) Git() *http.BasicAuth

Jump to

Keyboard shortcuts

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