iguana

package module
v0.0.0-...-41e8347 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 11 Imported by: 0

README

Iguana

  • Push all your static files to your cloud CDN, even adding cache headers to it.
  • All static files can have an unique url that is being obtained from i'ts content checksum.
  • Check what dependencies are missing.

Example

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObfuscateStatic

func ObfuscateStatic(static files.Static) (string, error)

ObfuscateStatic helper to obfuscate statics

Types

type Config

type Config struct {
	SWPath             string //the main path of your sw files
	OriginalPath       string
	FuncCheckSum       func([]byte) string //funtion to get checksum
	FuncIDURLNormal    FuncString          //function to get id and url from file if content it's not obfuscated
	FuncIDURLObf       FuncString          //function to get id and url from file if content it's obfuscated
	FuncObf            FuncObf             //function to get the file's obfuscated content
	FuncReplaceRelPath FuncSkipPath        //function to skip files, it returns true, file will be skip for replacement
	SkipLogging        bool
}

Config it will have the config to use

func GetDefaultConfig

func GetDefaultConfig() Config

GetDefaultConfig returns the default configuration to use to hadle the files

func (Config) GetFiles

func (config Config) GetFiles(workingPath string) (map[string]files.HTML, map[string]files.Static, map[string]files.SW)

GetFiles returns files at a given path

func (Config) GetFilesObf

func (config Config) GetFilesObf(workingPath string) (map[string]files.HTML, map[string]files.Static, map[string]files.SW)

GetFilesObf returns files at a given path filling it with it's obfuscated content

type FuncObf

type FuncObf func(files.Static) (string, error)

FuncObf represents function that is gonna be called to obfuscate the file

type FuncSkipPath

type FuncSkipPath func(string, string) bool

FuncSkipPath represents a func to skip files, first argument should be the file's full path that contains the path to skip

type FuncString

type FuncString func(files.Static) (string, string)

FuncString represents will be used for returning id and the url

Directories

Path Synopsis
this package is suppose to work internally, I will make this setup available ti public in a future
this package is suppose to work internally, I will make this setup available ti public in a future

Jump to

Keyboard shortcuts

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