util

package
v0.0.0-...-f12bbbc Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const LinkPostfix = "_link"
View Source
const NorthstarDedicatedRepo = "ghcr.io/pg9182/"
View Source
const RequiredByClientPostfix = "_clientRequired"
View Source
const VersionPostfix = "_version"

Variables

View Source
var DockerTagRegexp = regexp.MustCompile("^(northstar-dedicated|northstar-dedicated-ci|northstar-dedicated-dev):([a-zA-Z0-9_.-]{1,128})$")
View Source
var ErrBufferCapacityExceeded = fmt.Errorf("buffer capacity exceeded. File too large")
View Source
var NorthstarVersions = map[string]DockerVersion{
	"1.22.0": {
		IsLatest:    true,
		DockerImage: NorthstarDedicatedRepo + "northstar-dedicated:1-tf2.0.11.0-ns1.22.0",
	},
}
View Source
var RemoteFile = "/extract.zip"

Functions

func Btoi

func Btoi(b bool) int

func CreateFunnyName

func CreateFunnyName() string

CreateFunnyName generates a docker like name.

func EncodePrivateKeyToPEM

func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte

EncodePrivateKeyToPEM encodes Private Key from RSA to PEM format

func FormatLogExtractionScript

func FormatLogExtractionScript() string

func FormatStartupScript

func FormatStartupScript(ctx context.Context, server *nsserver.NSServer, serverDesc string, insecure bool) (string, error)

func GeneratePrivateKey

func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)

GeneratePrivateKey creates a RSA Private Key of specified byte size

func GeneratePublicKey

func GeneratePublicKey(privatekey *rsa.PublicKey) ([]byte, error)

GeneratePublicKey take a rsa.PublicKey and return bytes suitable for writing to .pub file returns in the format "ssh-rsa ..."

func LatestStableDockerNorthstar

func LatestStableDockerNorthstar() (string, string)

func RestartServerScript

func RestartServerScript() string

Types

type CappedBuffer

type CappedBuffer struct {
	Cap   int
	MyBuf *bytes.Buffer
}

func (*CappedBuffer) Write

func (b *CappedBuffer) Write(content []byte) (n int, err error)

type DockerVersion

type DockerVersion struct {
	IsLatest    bool
	DockerImage string
}

Jump to

Keyboard shortcuts

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