api39

package
v0.0.0-...-273d5ea Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Addr

func Addr(ctx iris.Context)

func GenerateApiKey

func GenerateApiKey(n int) (string, error)

func GenerateConfig

func GenerateConfig(n int) error

func IpfsAddDir

func IpfsAddDir(url, path string) (string, error)

func IpfsGetAddr

func IpfsGetAddr(url string) ([]string, error)

func IsValidMAC

func IsValidMAC(message, messageMAC, key []byte) bool

func NewWithConfig

func NewWithConfig(cfgfile string) (iris.Handler, error)

func ParseBody

func ParseBody(ctx iris.Context)

func RebuildWithHugo

func RebuildWithHugo(hugo, path string) error

func RebuildWithMake

func RebuildWithMake(path string, targets ...string) error

func RecordBody

func RecordBody(ctx iris.Context)

func UpdateGitRepo

func UpdateGitRepo(url, path, branchname string) error

func VerifyGithubSignature

func VerifyGithubSignature(ctx iris.Context)

func WithConfig

func WithConfig(cfg *Config) iris.Handler

Types

type Config

type Config struct {
	Filename string        `json:"-"`
	Apikey   string        `json:"apikey"`
	Domain   string        `json:"domain"`
	Site     SiteConfig    `json:"site"`
	Ipfs     IpfsConfig    `json:"ipfs"`
	Stripe   StripeConfig  `json:"stripe"`
	GoDaddy  GoDaddyConfig `json:"godaddy"`
}

func ReadConfig

func ReadConfig(filename string) (*Config, error)

type GoDaddyConfig

type GoDaddyConfig struct {
	Key    string `json:"key"`
	Secret string `json:"secret"`
}

type IpfsConfig

type IpfsConfig struct {
	Url string `json:"url"`
}

type SiteConfig

type SiteConfig struct {
	Repo    string `json:"repo"`
	Path    string `json:"path"`
	DevPath string `json:"devpath"`
	Hugo    string `json:"hugo"`
}

type StripeConfig

type StripeConfig struct {
	Apikey     string `json:"apikey"`
	Currency   string `json:"currency"`
	Product    string `json:"product"`
	SuccessURL string `json:"success"`
	CancelURL  string `json:"cancel"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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