package tsoptions

import (
	"time"
)

type Granularity string

const (
	TSGSeconds Granularity = "seconds"
	TSGMinutes Granularity = "minutes"
	TSGHours   Granularity = "hours"
)

func (t Granularity) String() string { return string(t) }

type Options struct {
	Collection  string
	TimeField   string
	Granularity Granularity
	MetaField   string        // optional, can be empty
	ExpireAfter time.Duration // optional, zero means no TTL
}
