Versions in this module Expand all Collapse all v3 v3.0.0 Aug 18, 2020 Changes in this version + const ActionAdd + const ActionCreate + const ActionDelete + const ActionRemove + const ActionUpdate + const NormalizerNFC + const NormalizerNFD + const NormalizerNFKC + const NormalizerNFKCCaseFold + const NormalizerNFKD + const TimeUnitDay + const TimeUnitHalfDay + const TimeUnitHour + const TimeUnitMicrosecond + const TimeUnitMillisecond + const TimeUnitMinute + const TimeUnitNanosecond + const TimeUnitSecond + func MarshalJSON(value Value) ([]byte, error) + func UnmarshalJSON(buffer []byte, outValue *Value) error + type Arr []interface + func (arr Arr) MarshalJSON() ([]byte, error) + func (arr Arr) String() string + type ArrayV []Value + func (arr ArrayV) At(field Field) FieldValue + func (arr ArrayV) Get(i interface{}) error + func (arr ArrayV) String() string + type BadRequest struct + type BooleanV bool + func (boolean BooleanV) At(field Field) FieldValue + func (boolean BooleanV) Get(i interface{}) error + func (boolean BooleanV) String() string + type BytesV []byte + func (bytes BytesV) At(field Field) FieldValue + func (bytes BytesV) Get(i interface{}) error + func (bytes BytesV) MarshalJSON() ([]byte, error) + func (bytes BytesV) String() string + type ClientConfig func(*FaunaClient) + func DisableTxnTimePassthrough() ClientConfig + func EnableTxnTimePassthrough() ClientConfig + func Endpoint(url string) ClientConfig + func HTTP(http *http.Client) ClientConfig + func Observer(observer ObserverCallback) ClientConfig + func QueryTimeoutMS(millis uint64) ClientConfig + type DateV time.Time + func (date DateV) At(field Field) FieldValue + func (date DateV) Get(i interface{}) error + func (date DateV) MarshalJSON() ([]byte, error) + func (date DateV) String() string + type DecodeError struct + func (d DecodeError) Error() string + type DoubleV float64 + func (num DoubleV) At(field Field) FieldValue + func (num DoubleV) Get(i interface{}) error + func (num DoubleV) String() string + type Expr interface + String func() string + func Abort(msg interface{}) Expr + func Abs(value interface{}) Expr + func Acos(value interface{}) Expr + func Add(args ...interface{}) Expr + func All(collection interface{}) Expr + func And(args ...interface{}) Expr + func Any(collection interface{}) Expr + func Append(elems, coll interface{}) Expr + func Asin(value interface{}) Expr + func At(timestamp, expr interface{}) Expr + func Atan(value interface{}) Expr + func BitAnd(args ...interface{}) Expr + func BitNot(value interface{}) Expr + func BitOr(args ...interface{}) Expr + func BitXor(args ...interface{}) Expr + func Call(ref interface{}, args ...interface{}) Expr + func Casefold(str interface{}, options ...OptionalParameter) Expr + func Ceil(value interface{}) Expr + func Class(name interface{}) Expr + func Classes() Expr + func Collection(name interface{}) Expr + func Collections() Expr + func Concat(terms interface{}, options ...OptionalParameter) Expr + func Contains(path, value interface{}) Expr + func ContainsField(field, value interface{}) Expr + func ContainsPath(path, value interface{}) Expr + func ContainsStr(value interface{}, search interface{}) Expr + func ContainsStrRegex(value interface{}, pattern interface{}) Expr + func ContainsValue(value, in interface{}) Expr + func Cos(value interface{}) Expr + func Cosh(value interface{}) Expr + func Count(collection interface{}) Expr + func Create(ref, params interface{}) Expr + func CreateClass(params interface{}) Expr + func CreateCollection(params interface{}) Expr + func CreateDatabase(params interface{}) Expr + func CreateFunction(params interface{}) Expr + func CreateIndex(params interface{}) Expr + func CreateKey(params interface{}) Expr + func CreateRole(params interface{}) Expr + func Credentials() Expr + func Database(name interface{}) Expr + func Databases() Expr + func Date(str interface{}) Expr + func DayOfMonth(value interface{}) Expr + func DayOfWeek(value interface{}) Expr + func DayOfYear(value interface{}) Expr + func Degrees(value interface{}) Expr + func Delete(ref interface{}) Expr + func Difference(sets ...interface{}) Expr + func Distinct(set interface{}) Expr + func Divide(args ...interface{}) Expr + func Do(exprs ...interface{}) Expr + func Documents(collection interface{}) Expr + func Drop(num, coll interface{}) Expr + func EndsWith(value interface{}, search interface{}) Expr + func Epoch(num, unit interface{}) Expr + func Equals(args ...interface{}) Expr + func Events(refSet interface{}) Expr + func Exists(ref interface{}, options ...OptionalParameter) Expr + func Exp(value interface{}) Expr + func Filter(coll, lambda interface{}) Expr + func FindStr(str, find interface{}, options ...OptionalParameter) Expr + func FindStrRegex(str, pattern interface{}, options ...OptionalParameter) Expr + func Floor(value interface{}) Expr + func Foreach(coll, lambda interface{}) Expr + func Format(format interface{}, values ...interface{}) Expr + func Function(name interface{}) Expr + func Functions() Expr + func GT(args ...interface{}) Expr + func GTE(args ...interface{}) Expr + func Get(ref interface{}, options ...OptionalParameter) Expr + func HasIdentity() Expr + func Hour(value interface{}) Expr + func Hypot(a, b interface{}) Expr + func Identify(ref, password interface{}) Expr + func Identity() Expr + func If(cond, then, elze interface{}) Expr + func Index(name interface{}) Expr + func Indexes() Expr + func Insert(ref, ts, action, params interface{}) Expr + func Intersection(sets ...interface{}) Expr + func IsArray(expr interface{}) Expr + func IsBoolean(expr interface{}) Expr + func IsBytes(expr interface{}) Expr + func IsCollection(expr interface{}) Expr + func IsCredentials(expr interface{}) Expr + func IsDatabase(expr interface{}) Expr + func IsDate(expr interface{}) Expr + func IsDoc(expr interface{}) Expr + func IsDouble(expr interface{}) Expr + func IsEmpty(coll interface{}) Expr + func IsFunction(expr interface{}) Expr + func IsIndex(expr interface{}) Expr + func IsInteger(expr interface{}) Expr + func IsKey(expr interface{}) Expr + func IsLambda(expr interface{}) Expr + func IsNonEmpty(coll interface{}) Expr + func IsNull(expr interface{}) Expr + func IsNumber(expr interface{}) Expr + func IsObject(expr interface{}) Expr + func IsRef(expr interface{}) Expr + func IsRole(expr interface{}) Expr + func IsSet(expr interface{}) Expr + func IsString(expr interface{}) Expr + func IsTimestamp(expr interface{}) Expr + func IsToken(expr interface{}) Expr + func Join(source, target interface{}) Expr + func KeyFromSecret(secret interface{}) Expr + func Keys() Expr + func LT(args ...interface{}) Expr + func LTE(args ...interface{}) Expr + func LTrim(str interface{}) Expr + func Lambda(varName, expr interface{}) Expr + func Length(str interface{}) Expr + func Ln(value interface{}) Expr + func Log(value interface{}) Expr + func Login(ref, params interface{}) Expr + func Logout(invalidateAll interface{}) Expr + func LowerCase(str interface{}) Expr + func Map(coll, lambda interface{}) Expr + func Match(ref interface{}) Expr + func MatchTerm(ref, terms interface{}) Expr + func Max(args ...interface{}) Expr + func Mean(collection interface{}) Expr + func Merge(merge interface{}, with interface{}, lambda ...OptionalParameter) Expr + func Min(args ...interface{}) Expr + func Minute(value interface{}) Expr + func Modulo(args ...interface{}) Expr + func Month(value interface{}) Expr + func MoveDatabase(from interface{}, to interface{}) Expr + func Multiply(args ...interface{}) Expr + func NewId() Expr + func NextID() Expr + func Not(boolean interface{}) Expr + func Now() Expr + func Null() Expr + func Or(args ...interface{}) Expr + func Paginate(set interface{}, options ...OptionalParameter) Expr + func Pow(base, exp interface{}) Expr + func Prepend(elems, coll interface{}) Expr + func Query(lambda interface{}) Expr + func RTrim(str interface{}) Expr + func Radians(value interface{}) Expr + func Range(set interface{}, from interface{}, to interface{}) Expr + func Reduce(lambda, initial interface{}, collection interface{}) Expr + func Ref(idOrRef interface{}, id ...interface{}) Expr + func RefClass(classRef, id interface{}) Expr + func RefCollection(collectionRef, id interface{}) Expr + func RegexEscape(value interface{}) Expr + func Remove(ref, ts, action interface{}) Expr + func Repeat(str, number interface{}) Expr + func Replace(ref, params interface{}) Expr + func ReplaceStr(str, find, replace interface{}) Expr + func ReplaceStrRegex(value, pattern, replace interface{}, options ...OptionalParameter) Expr + func Reverse(collection interface{}) Expr + func Role(name interface{}) Expr + func Roles() Expr + func Round(value interface{}, options ...OptionalParameter) Expr + func ScopedClass(name interface{}, scope interface{}) Expr + func ScopedClasses(scope interface{}) Expr + func ScopedCollection(name interface{}, scope interface{}) Expr + func ScopedCollections(scope interface{}) Expr + func ScopedCredentials(scope interface{}) Expr + func ScopedDatabase(name interface{}, scope interface{}) Expr + func ScopedDatabases(scope interface{}) Expr + func ScopedFunction(name interface{}, scope interface{}) Expr + func ScopedFunctions(scope interface{}) Expr + func ScopedIndex(name interface{}, scope interface{}) Expr + func ScopedIndexes(scope interface{}) Expr + func ScopedKeys(scope interface{}) Expr + func ScopedRole(name, scope interface{}) Expr + func ScopedRoles(scope interface{}) Expr + func ScopedTokens(scope interface{}) Expr + func Second(value interface{}) Expr + func Select(path, value interface{}, options ...OptionalParameter) Expr + func SelectAll(path, value interface{}) Expr + func Sign(value interface{}) Expr + func Sin(value interface{}) Expr + func Singleton(ref interface{}) Expr + func Sinh(value interface{}) Expr + func Space(value interface{}) Expr + func Sqrt(value interface{}) Expr + func StartsWith(value interface{}, search interface{}) Expr + func SubString(str, start interface{}, options ...OptionalParameter) Expr + func Subtract(args ...interface{}) Expr + func Sum(collection interface{}) Expr + func Take(num, coll interface{}) Expr + func Tan(value interface{}) Expr + func Tanh(value interface{}) Expr + func Time(str interface{}) Expr + func TimeAdd(base interface{}, offset interface{}, unit interface{}) Expr + func TimeDiff(start interface{}, finish interface{}, unit interface{}) Expr + func TimeSubtract(base interface{}, offset interface{}, unit interface{}) Expr + func TitleCase(str interface{}) Expr + func ToArray(value interface{}) Expr + func ToDate(value interface{}) Expr + func ToDouble(value interface{}) Expr + func ToInteger(value interface{}) Expr + func ToMicros(value interface{}) Expr + func ToMillis(value interface{}) Expr + func ToNumber(value interface{}) Expr + func ToObject(value interface{}) Expr + func ToSeconds(value interface{}) Expr + func ToString(value interface{}) Expr + func ToTime(value interface{}) Expr + func Tokens() Expr + func Trim(str interface{}) Expr + func Trunc(value interface{}, options ...OptionalParameter) Expr + func Union(sets ...interface{}) Expr + func Update(ref, params interface{}) Expr + func UpperCase(str interface{}) Expr + func Var(name string) Expr + func Year(value interface{}) Expr + type FaunaClient struct + func NewFaunaClient(secret string, configs ...ClientConfig) *FaunaClient + func (client *FaunaClient) BatchQuery(exprs []Expr) (values []Value, err error) + func (client *FaunaClient) BatchQueryResult(expr []Expr) (value []Value, headers map[string][]string, err error) + func (client *FaunaClient) GetLastTxnTime() int64 + func (client *FaunaClient) NewSessionClient(secret string) *FaunaClient + func (client *FaunaClient) NewWithObserver(observer ObserverCallback) *FaunaClient + func (client *FaunaClient) Query(expr Expr, configs ...QueryConfig) (value Value, err error) + func (client *FaunaClient) QueryResult(expr Expr) (value Value, headers map[string][]string, err error) + func (client *FaunaClient) SyncLastTxnTime(newTxnTime int64) + type FaunaError interface + Errors func() []QueryError + Status func() int + type Field struct + func ArrIndex(indexes ...int) Field + func ObjKey(keys ...string) Field + func (f Field) At(other Field) Field + func (f Field) AtIndex(indexes ...int) Field + func (f Field) AtKey(keys ...string) Field + type FieldValue interface + Get func(i interface{}) error + GetValue func() (Value, error) + type InternalError struct + type InvalidFieldType struct + func (i InvalidFieldType) Error() string + type LetBuilder struct + func Let() *LetBuilder + func (lb *LetBuilder) Bind(key string, in interface{}) *LetBuilder + func (lb *LetBuilder) In(in Expr) Expr + type LongV int64 + func (num LongV) At(field Field) FieldValue + func (num LongV) Get(i interface{}) error + func (num LongV) String() string + type NotFound struct + type NullV struct + func (null NullV) At(field Field) FieldValue + func (null NullV) Get(i interface{}) error + func (null NullV) MarshalJSON() ([]byte, error) + func (null NullV) String() string + type Obj map[string]interface + func (obj Obj) MarshalJSON() ([]byte, error) + func (obj Obj) String() string + type ObjectV map[string]Value + func (obj ObjectV) At(field Field) FieldValue + func (obj ObjectV) Get(i interface{}) error + func (obj ObjectV) MarshalJSON() ([]byte, error) + func (obj ObjectV) String() string + type ObserverCallback func(*QueryResult) + type OptionalParameter func(Expr) Expr + func After(ref interface{}) OptionalParameter + func Before(ref interface{}) OptionalParameter + func ConflictResolver(lambda interface{}) OptionalParameter + func Default(value interface{}) OptionalParameter + func EventsOpt(events interface{}) OptionalParameter + func Normalizer(norm interface{}) OptionalParameter + func OnlyFirst() OptionalParameter + func Precision(precision interface{}) OptionalParameter + func Separator(sep interface{}) OptionalParameter + func Size(size interface{}) OptionalParameter + func Sources(sources interface{}) OptionalParameter + func Start(start interface{}) OptionalParameter + func StrLength(length interface{}) OptionalParameter + func TS(timestamp interface{}) OptionalParameter + type PermissionDenied struct + type QueryConfig func(*faunaRequest) + func TimeoutMS(millis uint64) QueryConfig + type QueryError struct + Code string + Description string + Failures []ValidationFailure + Position []string + type QueryResult struct + Client *FaunaClient + EndTime time.Time + Headers map[string][]string + Query Expr + Result Value + StartTime time.Time + StatusCode int + type QueryV struct + func (query QueryV) At(field Field) FieldValue + func (query QueryV) Get(i interface{}) error + func (query QueryV) MarshalJSON() ([]byte, error) + func (query QueryV) String() string + type RefV struct + Class *RefV + Collection *RefV + Database *RefV + ID string + func NativeClasses() *RefV + func NativeCollections() *RefV + func NativeCredentials() *RefV + func NativeDatabases() *RefV + func NativeFunctions() *RefV + func NativeIndexes() *RefV + func NativeKeys() *RefV + func NativeRoles() *RefV + func NativeTokens() *RefV + func (ref RefV) At(field Field) FieldValue + func (ref RefV) Get(i interface{}) error + func (ref RefV) MarshalJSON() ([]byte, error) + func (ref RefV) String() string + type SetRefV struct + Parameters map[string]Value + func (set SetRefV) At(field Field) FieldValue + func (set SetRefV) Get(i interface{}) error + func (set SetRefV) MarshalJSON() ([]byte, error) + func (set SetRefV) String() string + type StringV string + func (str StringV) At(field Field) FieldValue + func (str StringV) Get(i interface{}) error + func (str StringV) String() string + type TimeV time.Time + func (localTime TimeV) At(field Field) FieldValue + func (localTime TimeV) Get(i interface{}) error + func (localTime TimeV) MarshalJSON() ([]byte, error) + func (localTime TimeV) String() string + type Unauthorized struct + type Unavailable struct + type UnknownError struct + type ValidationFailure struct + Code string + Description string + Field []string + type Value interface + At func(Field) FieldValue + Get func(interface{}) error + type ValueNotFound struct + func (v ValueNotFound) Error() string Other modules containing this package github.com/fauna/faunadb-go github.com/fauna/faunadb-go/v4 github.com/fauna/faunadb-go/v5