utils

package
v0.0.0-...-5ad4fe9 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 15 Imported by: 2

Documentation

Overview

Package utils provides miscellaneous utilities and cert generation routines for Rhine.

Index

Constants

This section is empty.

Variables

View Source
var BinDir = func() string {
	ex, err := os.Executable()
	if err != nil {
		panic(err)
	}
	return filepath.Clean(filepath.Dir(ex) + "/")
}()

BinDir contains the directory in which executable executed is in ending with a forward slash.

Functions

func Check

func Check(err error)

Check if an error has occurred and panics if it has.

func GenerateCA

func GenerateCA(certPath, keyPath string) error

GenerateCA generates a new key-pair and saves it to the path specified.

func GetOutboundIP

func GetOutboundIP() string

GetOutboundIP gets preferred outbound ip of this machine.

func LoadCA

func LoadCA(certPath, keyPath string) error

LoadCA loads the cert and RSA key pair from the specified paths and configures goproxy to use it.

Types

This section is empty.

Directories

Path Synopsis
Package gamedata provides Arknights gamedata lookup datastructures parsed from https://github.com/Kengxxiao/ArknightsGameData.
Package gamedata provides Arknights gamedata lookup datastructures parsed from https://github.com/Kengxxiao/ArknightsGameData.

Jump to

Keyboard shortcuts

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