Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Meta ¶ added in v0.6.0
Meta will parse a template string according to the provided metadata query params all token should be prefixed with meta {meta:key}
func Parse ¶
Parse will parse a template string according to the provided instance of time.Time. It supports the following template tokens:
{YYYY} (year - four digits: ie 2017) {YY} (year - two digits: ie 17) {MM} (month - two digits: ie 12) {DD} (day - two digits: ie 13) {HH} (hour - two digits: ie 00) {TS} (timestamp in the format 20060102T150405) {SLUG} (alias of HOUR_SLUG) {HOUR_SLUG} (date hour slug, shorthand for {YYYY}/{MM}/{DD}/{HH}) {DAY_SLUG} (date day slug, shorthand for {YYYY}/{MM}/{DD}) {MONTH_SLUG} (date month slug, shorthand for {YYYY}/{MM}) {HOST} (os hostname)
Template values are case sensitive.
Items can be commented out by a hash sign # anything after the # will be ignored
Examples: template: "{YYYY}-{MM}-{DD}T{HH}:00" could return: "2017-01-01T23:00"
template: "{TS}" could return: "20170101T230101"
template: "base/path/{SLUG}/records-{TS}.json.gz" could return: "base/path/2017/01/01/23/records-20170101T230101.json.gz"
Types ¶
This section is empty.