mainhelpers

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const S3_BUCKET = "gotoherestatic"

Variables

This section is empty.

Functions

func AddBytesToS3

func AddBytesToS3(s *session.Session, destFileName string, buffer []byte) error

func AddFileFileToS3

func AddFileFileToS3(s *session.Session, fileDir string) error

AddFileToS3 will upload a single file to S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.

func GetIPAdress added in v0.2.5

func GetIPAdress(r *http.Request) string

func GetRandomB64String added in v0.2.5

func GetRandomB64String() string

func HandleHttpSubdomainRequest added in v0.2.5

func HandleHttpSubdomainRequest(w http.ResponseWriter, r *http.Request, ex *iot.Executive, subDomain string)

func IsLocal added in v0.2.8

func IsLocal(r *http.Request) bool

func MakeMedium32cToken added in v0.1.4

func MakeMedium32cToken() (string, tokens.KnotFreeTokenPayload)

Makes a tokens.Medium token which is 32 connections

func ParsePayload added in v0.2.8

func ParsePayload(httpBytes string) (string, map[string]string, string)

func StartPublicServer added in v0.2.8

func StartPublicServer(ce *iot.ClusterExecutive)

func TrySomeS3Stuff

func TrySomeS3Stuff()

func XXXScaleTokenPayload added in v0.1.4

func XXXScaleTokenPayload(token *tokens.KnotFreeTokenPayload, scale float64) *tokens.KnotFreeTokenPayload

Types

type ApiHandler added in v0.2.8

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

func (ApiHandler) ServeHTTP added in v0.2.8

func (api ApiHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (ApiHandler) ServeMakeToken added in v0.2.8

func (api ApiHandler) ServeMakeToken(w http.ResponseWriter, req *http.Request)

type ProxyHandler added in v0.2.8

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

func (*ProxyHandler) ServeHTTP added in v0.2.8

func (ph *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RequestReplyStruct added in v0.2.5

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

type SuperMux added in v0.2.8

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

func (*SuperMux) ServeHTTP added in v0.2.8

func (superMux *SuperMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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