files

package
v0.0.0-...-8898136 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeB64IntoByteSlice

func DecodeB64IntoByteSlice(b64 string) []byte

DecodeB64IntoByteSlice decodes the given b64 string into a byte slice

func EncodeB64ByteSlice

func EncodeB64ByteSlice(b64 []byte) string

EncodeB64ByteSlice decodes the given b64 byte slice into a string

Types

type B64Files

type B64Files struct {
	Logos struct {
		VColor BasicLogoProps `json:"v-color"`
		VWhite BasicLogoProps `json:"v-white"`
		HColor BasicLogoProps `json:"h-color"`
		HWhite BasicLogoProps `json:"h-white"`
	} `json:"logos"`

	Fonts []string `json:"fonts"` // fonts[0] = ProductSans
}

B64Files represents the file used in the program represented as base64 strings well this way is faster than loading an actual file (i've tested alot) and swapping files only requires restarting the server :0

type BasicLogoProps

type BasicLogoProps struct {
	TextSize float64 `json:"text_size"`
}

BasicLogoProps defines basic logo props

type DecodedB64File

type DecodedB64File struct {
	Data     []byte
	TextSize float64 // just for the logo
}

DecodedB64File defines decoded base64 file

type Files

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

Files manages the base64 files pulled from the json file (file of files LOL)

func GetFilesInstance

func GetFilesInstance() *Files

GetFilesInstance returns a singlton Files instance (much faster)

func (*Files) GetHorizontalLogoColored

func (f *Files) GetHorizontalLogoColored() DecodedB64File

GetHorizontalLogoColored returns basic logo props

func (*Files) GetHorizontalLogoWhite

func (f *Files) GetHorizontalLogoWhite() DecodedB64File

GetHorizontalLogoWhite returns basic logo props

func (*Files) GetProductSansFont

func (f *Files) GetProductSansFont() []byte

GetProductSansFont returns a byte slice of the thing

func (*Files) GetVerticalLogoColored

func (f *Files) GetVerticalLogoColored() DecodedB64File

GetVerticalLogoColored returns basic logo props

func (*Files) GetVerticalLogoWhite

func (f *Files) GetVerticalLogoWhite() DecodedB64File

GetVerticalLogoColored returns basic logo props

Jump to

Keyboard shortcuts

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