func (c *Coercable) AsInt64() int64 {
	value, ok := maybeIntToInt64(c.rawValue, true)
	if !ok {
		c.storeError("int64", "int")
		value, _ = c.defaultValue.(int64)
	}
	return value
}
AsInt64 converts the Coercable into an int64 type.
If this is impossible, then the zero value will be returned

Note: if the underlying object is a []string, then the first value will be converted
into an int64, then returned
package dissectors
import (
	"fmt"
	"time"
	"github.com/theparanoids/ashirt-server/backend"
)
type Coercable struct {
	backReference *DissectedRequest
	fieldName     string
	rawValue      interface{}
	defaultValue  interface{}
	required      bool
	fieldPresent  bool
}
func makeCoercable(backref *DissectedRequest, key string, keyFound bool, value interface{}) *Coercable {
	return &Coercable{
		required:      false,
		rawValue:      value,
		backReference: backref,
		fieldName:     key,
		fieldPresent:  keyFound,
	}
}
func makeErrCoercable(backref *DissectedRequest) *Coercable {
	return &Coercable{backReference: backref}
}
func (c *Coercable) OrDefault(defaultValue interface{}) *Coercable {
	c.defaultValue = defaultValue
	return c
}
func (c *Coercable) Required() *Coercable {
	c.required = true
	return c
}
func (c *Coercable) storeError(nameOfType, friendlyName string) {
	if c.required && c.backReference.Error == nil {
		if !c.fieldPresent {
			c.backReference.Error = backend.MissingValueErr(c.fieldName)
		} else {
			c.backReference.Error = backend.BadInputErr(
				fmt.Errorf("Unable to coerce into %v", nameOfType),
				fmt.Sprintf("%v must be a %v", c.fieldName, friendlyName),
			)
		}
	}
}
func (c *Coercable) AsString() string {
	value, ok := maybeStringToString(c.rawValue)
	if !ok {
		c.storeError("string", "string")
		value, _ = c.defaultValue.(string)
	}
	return value
}
func (c *Coercable) AsStringPtr() *string {
	if c.rawValue == nil {
		return nil
	}
	v := c.AsString()
	return &v
}
func (c *Coercable) AsTime() time.Time {
	value, ok := maybeTimeToTime(c.rawValue)
	if !ok {
		c.storeError("datetime", "datetime in RFC3339 format")
		value, _ = c.defaultValue.(time.Time)
	}
	return value
}
func (c *Coercable) AsUnixTime() time.Time {
	var value time.Time
	iValue, ok := maybeIntToInt64(c.rawValue, false)
	if ok {
		value = time.Unix(0, iValue)
	} else {
		c.storeError("datetime", "datetime in unix format")
		value, _ = c.defaultValue.(time.Time)
	}
	return value
}