Documentation ¶
Index ¶
- Constants
- Variables
- func Changes(stat1, stat2 fs.FileInfo) (Change, Change)
- func ChunkBytesVariablely(byteArr []byte, chunks int) [][]byte
- func ChunkedRandomPrime(bits, chunks int) [][]byte
- func Counter(arr []byte) (map[byte]int, map[int]byte, int)
- func CreateSelfSignedCertificates(proxy ReverseProxy)
- func DecodeBase64(arr []byte, c chan []byte)
- func DecodeHex(src []byte) chan []byte
- func EncodeBase64(arr []byte, c chan []byte)
- func EncodeHex(src []byte) chan []byte
- func EncodeRune(arr []byte, c chan []rune)
- func FixedXOR(src []byte, res chan []byte)
- func GenerateLogger(namespace string) *log.Logger
- func MostFrequentIn(arr []byte) byte
- func NewNetworkGraph(args Edge) *ring.Ring
- func OpenTempFile() *os.File
- func PrettyPrint(v interface{}) string
- func PrintAll(r *ring.Ring)
- func RandomPrime(bits int) []byte
- func StartServer(ctx context.Context, proxy *ReverseProxy)
- func Sum(nums ...byte) int
- func Tar(src string, writers ...io.Writer) error
- func WithContext(parentContext context.Context) net.Dialer
- type Change
- type ContextHandler
- type DirectoryGraph
- type Edge
- type Environment
- type EphemeralId
- type EphemeralUser
- type FileNode
- type KeyDB
- type KeyPair
- type KeygenErr
- type Pool
- type PrivateKey
- type ProxyManager
- type PublicKey
- type ReverseProxy
- type ReverseProxyConfig
- type StartContext
- type SysInfo
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetId() int32
- func (x *Token) GetLastUpdated() *timestamp.Timestamp
- func (x *Token) GetName() string
- func (x *Token) GetToken() string
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (x *Token) String() string
- type Weights
Constants ¶
const ( Version string = "v0.1.x" CoreEnvironmentRoot string = ".env" CoreTemporaryCacheRoot string = ".env/.tmp" CoreLogRoot string = ".env/logs" CoreFsRoot string = ".env/corefs" CoreMockTestDataRoot string = ".env/mock/input" CoreFsCompressedRoot string = ".env/corefs.tax.xz" SESSION_CIPHER_FORMAT string = "\n-----BEGIN KDB SESSION CIPHER-----\n%s\n-----END KDB SESSION CIPHER-----\n" InternalKeyDBDomain string = "core.keydb.internal:9990?reuseport=true" InternalKeyDBNetwork string = "tcp" XSRFActionID string = "CLAIMED" CoreWeightsPath string = ".env/static/byte_weights" )
Variables ¶
var File_token_proto protoreflect.FileDescriptor
Functions ¶
func ChunkBytesVariablely ¶
func ChunkedRandomPrime ¶
func Counter ¶
* Counter Maps bytes to their frequency in the input arr & returns the map, the inverse mapping, and the maximum frequency of appearence in arr
func CreateSelfSignedCertificates ¶
func CreateSelfSignedCertificates(proxy ReverseProxy)
- CreateSelfSignedCertificates Creates a CA Cert & Key for a given ReverseProxy & writes to disk
func DecodeBase64 ¶
func EncodeBase64 ¶
func EncodeRune ¶
func FixedXOR ¶
* FixedXOR The resulting channel will get a hex encoded []byte created from the XOR of each byte i where
src[i] XOR [i+len(src)/2]
while any []byte can be the src the general use-case is to pre-encode src to hex
func MostFrequentIn ¶
func NewNetworkGraph ¶
* Graph Builds a two-dimensional, rectangular graph, Wraps *ring.Ring
func OpenTempFile ¶
func PrettyPrint ¶
func PrettyPrint(v interface{}) string
func PrintAll ¶
* PrintAll Prints all nodes in a subgraph Passing root will print the entire graph Take note of r.Do, this basic example shows how to:
- cast to our type Edge
- Print, however, this can be any transformation f(e)
func RandomPrime ¶
func StartServer ¶
func StartServer(ctx context.Context, proxy *ReverseProxy)
Starts http server & defers closing of it as a default/backup
Types ¶
type ContextHandler ¶
type ContextHandler interface { Key() Value() }
type DirectoryGraph ¶
func NewDirectoryGraph ¶
func NewDirectoryGraph(root string) DirectoryGraph
* Initilization Functions for initilizing a new graph
func (DirectoryGraph) Size ¶
func (g DirectoryGraph) Size() int
type Edge ¶
type Edge struct {
Depth, Breadth int
}
* Edge Represents either the bounds of or a single point within a two-dimensional matrix/graph. You can create new, traverse & route requests to individual containers starting from any `Edge` Here is what Graph(Edge{2, 4}) generates
┌────────┐ ┌─────────────┤e[-1,-1]├────────────────┐ │ └────────┘ │ │ │ ┌────┴───┐ ┌────▼───┐ │ e[0,0] │ │ e[1,0] │ ┌─────────┼────────┼──────────┐ ┌─────────┼────────┼──────────┐ │ │ │ │ │ │ │ │
┌────▼───┬┬────▼───┬┬───▼────┬┬────▼───||────▼───┬┬────▼───┬┬───▼────┬┬────▼───┐ │ e[0,1] ││ e[0,2] ││ e[0,3] ││ e[0,4] || e[1,1] ││ e[1,2] ││ e[1,3] ││ e[1,4] │ └────────┴┴────────┴┴────────┴┴────────||────────┴┴────────┴┴────────┴┴────────┘
type Environment ¶
type Environment struct { Files []string // contains filtered or unexported fields }
func NewEnvironment ¶
func NewEnvironment() Environment
func (Environment) AddFile ¶
func (e Environment) AddFile(filename string)
func (Environment) AddFiles ¶
func (e Environment) AddFiles(files ...string) Environment
func (Environment) Compress ¶
func (e Environment) Compress()
func (Environment) CompressedFiles ¶
func (e Environment) CompressedFiles() []fs.FileInfo
func (Environment) Decompress ¶
func (e Environment) Decompress()
func (Environment) DecompressedFiles ¶
func (e Environment) DecompressedFiles() []fs.FileInfo
type EphemeralId ¶
type EphemeralId int
type EphemeralUser ¶
type EphemeralUser struct { Id EphemeralId GId EphemeralId // contains filtered or unexported fields }
type KeyPair ¶
type KeyPair struct { Pb PublicKey Pk PrivateKey }
func GenerateKeyPair ¶
* GenerateKeyPair Creates a random pb, pk that sit along the P224 ellipitic curve which implements P-224 (see FIPS 186-3, section D.2.2).
type Pool ¶ added in v0.1.5
type Pool struct { Token []*Token `protobuf:"bytes,1,rep,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*Pool) Descriptor
deprecated
added in
v0.1.5
func (*Pool) ProtoMessage ¶ added in v0.1.5
func (*Pool) ProtoMessage()
func (*Pool) ProtoReflect ¶ added in v0.1.5
func (x *Pool) ProtoReflect() protoreflect.Message
type PrivateKey ¶
type PrivateKey []byte
type ProxyManager ¶
type ProxyManager struct {
Proxys []*ReverseProxy
}
type ReverseProxy ¶
type ReverseProxy struct { Cfg ReverseProxyConfig // contains filtered or unexported fields }
func (*ReverseProxy) CreateMockListeningService ¶
func (r *ReverseProxy) CreateMockListeningService()
CreateMockListeningService is called if the Service specific in ReverseProxyConfig was unreachable. It spins up a http server on the Service you intended to proxy to
func (*ReverseProxy) ListenForClose ¶
func (r *ReverseProxy) ListenForClose()
Listens on a channel for a kill sig (any byte)
type ReverseProxyConfig ¶
type ReverseProxyConfig struct { Domain string `yaml:"domain"` Service string `yaml:"service"` CertPath string `yaml:"cert"` KeyPath string `yaml:"key"` LetsEncrypt bool `yaml:"letsencrypt"` Term chan byte Dialer net.Dialer }
func (ReverseProxyConfig) NewProxy ¶
func (cfg ReverseProxyConfig) NewProxy(parentCtx context.Context) (ReverseProxy, context.Context)
type StartContext ¶
func (*StartContext) GetKey ¶
func (t *StartContext) GetKey() string
func (*StartContext) GetTime ¶
func (t *StartContext) GetTime() time.Time
type Token ¶ added in v0.1.5
type Token struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` LastUpdated *timestamp.Timestamp `protobuf:"bytes,4,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` // contains filtered or unexported fields }
[START messages]
func (*Token) Descriptor
deprecated
added in
v0.1.5
func (*Token) GetLastUpdated ¶ added in v0.1.5
func (*Token) ProtoMessage ¶ added in v0.1.5
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶ added in v0.1.5
func (x *Token) ProtoReflect() protoreflect.Message