templating

package
v0.0.0-...-174f435 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(imageInfo ImageInfo) string

func ProcessFile

func ProcessFile(fileName string, vars interface{}) string

ProcessFile parses the supplied filename and compiles its template using the given variables.

func ProcessString

func ProcessString(str string, vars interface{}) string

ProcessString parses the supplied string and compiles it using the given variables.

Types

type Data

type Data struct {
	WorkID  string
	PageId  string
	Key     string
	Width1  float32
	Width2  float32
	Width3  float32
	Width4  float32
	Width5  float32
	Height1 float32
	Height2 float32
	Height3 float32
	Height4 float32
	Height5 float32
}

type ImageInfo

type ImageInfo struct {
	Depth       uint    `json:"depth"`
	Height      int32   `json:"height"`
	Width       int32   `json:"width"`
	Size        int32   `json:"size"`
	X           float64 `json:"x"`
	Y           float64 `json:"y"`
	Document    string  `json:"document"`
	Context     string  `json:"context"`
	Product     string  `json:"product"`
	Page        string  `json:"page"`
	InfoJsonKey string  `json:"infojsonkey"`
}

Jump to

Keyboard shortcuts

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