...

Package shared

import "bitbucket.org/twicedb/twicedb-go/shared"
Overview
Index
Subdirectories

Overview ▾

Package shared provides structs and utilities that are shared between the client and the server.

Index ▾

Constants
func FirstN(s string, n int) string
func LoadTLSCredentialsForFiles(certFile string, keyFile string, caFile string) (credentials.TransportCredentials, error)
func MutexLocked(m *sync.Mutex) bool
type BackfillTt
    func BackfillTtOf(t time.Time) BackfillTt
    func BackfillTtOfTt(tt Tt) BackfillTt
    func (btt BackfillTt) Greater(tt Tt) bool
type BatchSize
type Blob
    func NewBlob(b []byte) *Blob
    func NewCompressedBlob(b []byte, sizeUncompressed int64) *Blob
    func (b *Blob) Compressed() bool
    func (b *Blob) Equal(b2 *Blob) bool
    func (b *Blob) SizeUncompressed() int64
type BoolIndexValue
type ClientCommonName
    func LoadClientCommonNameForFiles(certFile string, keyFile string) (ClientCommonName, error)
type EmailAddress
type Event
type EventBlob
type EventId
type Float32IndexValue
type Float64IndexValue
type Fqn
type IndexKey
type Int32IndexValue
type Int64IndexValue
type Lsqt
    func (lsqt Lsqt) Equal(lsqt2 Lsqt) bool
    func (lsqt Lsqt) GreaterEqual(tt Tt) bool
    func (lsqt Lsqt) GreaterLsqt(lsqt2 Lsqt) bool
    func (lsqt Lsqt) Increment() Lsqt
    func (lsqt Lsqt) Less(tt Tt) bool
    func (lsqt Lsqt) LessLsqt(lsqt2 Lsqt) bool
    func (lsqt Lsqt) Tt() Tt
    func (lsqt Lsqt) Vt() Vt
type ObjectId
    func (oid ObjectId) String() string
    func (oid ObjectId) Valid() bool
type Percentile
type ProjectedFieldKey
type ProjectedFieldValue
    func NewFloat32ProjectedFieldValue(f float32) *ProjectedFieldValue
    func NewFloat64ProjectedFieldValue(f float64) *ProjectedFieldValue
    func NewInt32ProjectedFieldValue(i int32) *ProjectedFieldValue
    func NewInt64ProjectedFieldValue(i int64) *ProjectedFieldValue
type StringIndexValue
type TemporalCoordinates
    func NewTemporalCoordinates(tt Tt, vt Vt) *TemporalCoordinates
type TimesliceId
    func (tsId TimesliceId) Greater(tsId2 TimesliceId) bool
    func (tsId TimesliceId) Less(tsId2 TimesliceId) bool
type TimestampIndexValue
    func TimeToTimestampIndexValue(t *time.Time) TimestampIndexValue
type Tt
    func TtOf(t time.Time) Tt
    func (tt Tt) Equal(tt2 Tt) bool
    func (tt Tt) Greater(tt2 Tt) bool
    func (tt Tt) GreaterEqual(tt2 Tt) bool
    func (tt Tt) Less(tt2 Tt) bool
    func (tt Tt) LessEqual(tt2 Tt) bool
    func (tt Tt) String() string
type Vt
    func VtOf(t time.Time) Vt
    func (vt Vt) Equal(vt2 Vt) bool
    func (vt Vt) Greater(vt2 Vt) bool
    func (vt Vt) GreaterEqual(vt2 Vt) bool
    func (vt Vt) Less(vt2 Vt) bool
    func (vt Vt) LessEqual(vt2 Vt) bool
    func (vt Vt) String() string

Package files

backfill_tt.go batch_size.go blob.go bool_index_value.go client_common_name.go constants.go doc.go email_address.go event.go event_blob.go event_id.go float32_index_value.go float64_index_value.go fqn.go index_key.go int32_index_value.go int64_index_value.go lsqt.go mutex_locked.go object_id.go percentile.go projected_field_key.go projected_field_value.go string_index_value.go temporal_coordinates.go timeslice_id.go timestamp_index_value.go tls.go tt.go util.go vt.go

Constants

const (
    NullEmailAddress              = EmailAddress("")
    AdminEntitlementsEmailAddress = EmailAddress("admin-entitlements")
    StarEmailAddress              = EmailAddress("*")
)
const (
    FqnEmpty = Fqn("")
    StarFqn  = Fqn("*")
)
const (
    BackfillTtMin = BackfillTt(int64(1))
)
const (
    Infinity = math.MaxInt64
)
const (
    NullTimesliceId = TimesliceId("")
)
const (
    StarClientCommonName = ClientCommonName("*")
)
const (
    TtInf = Tt(Infinity)
)
const (
    VtInf = Vt(Infinity)
)

func FirstN

func FirstN(s string, n int) string

func LoadTLSCredentialsForFiles

func LoadTLSCredentialsForFiles(certFile string, keyFile string, caFile string) (credentials.TransportCredentials, error)

func MutexLocked

func MutexLocked(m *sync.Mutex) bool

type BackfillTt

type BackfillTt int64

func BackfillTtOf

func BackfillTtOf(t time.Time) BackfillTt

func BackfillTtOfTt

func BackfillTtOfTt(tt Tt) BackfillTt

func (BackfillTt) Greater

func (btt BackfillTt) Greater(tt Tt) bool

type BatchSize

type BatchSize int32

type Blob

type Blob struct {
    Blob []byte
    // contains filtered or unexported fields
}

func NewBlob

func NewBlob(b []byte) *Blob

func NewCompressedBlob

func NewCompressedBlob(b []byte, sizeUncompressed int64) *Blob

func (*Blob) Compressed

func (b *Blob) Compressed() bool

func (*Blob) Equal

func (b *Blob) Equal(b2 *Blob) bool

func (*Blob) SizeUncompressed

func (b *Blob) SizeUncompressed() int64

type BoolIndexValue

type BoolIndexValue bool

type ClientCommonName

type ClientCommonName string

func LoadClientCommonNameForFiles

func LoadClientCommonNameForFiles(certFile string, keyFile string) (ClientCommonName, error)

type EmailAddress

type EmailAddress string

type Event

type Event interface {
    Blob() (EventBlob, error)
    EventId() EventId
    Fqn() Fqn
    SetEventId(EventId) error
    SetTt(Tt) error
    Tt() Tt
}

type EventBlob

type EventBlob []byte

type EventId

type EventId string

type Float32IndexValue

type Float32IndexValue float32

type Float64IndexValue

type Float64IndexValue float64

type Fqn

type Fqn string

type IndexKey

type IndexKey string

type Int32IndexValue

type Int32IndexValue int32

type Int64IndexValue

type Int64IndexValue int64

type Lsqt

type Lsqt Tt

func (Lsqt) Equal

func (lsqt Lsqt) Equal(lsqt2 Lsqt) bool

func (Lsqt) GreaterEqual

func (lsqt Lsqt) GreaterEqual(tt Tt) bool

func (Lsqt) GreaterLsqt

func (lsqt Lsqt) GreaterLsqt(lsqt2 Lsqt) bool

func (Lsqt) Increment

func (lsqt Lsqt) Increment() Lsqt

func (Lsqt) Less

func (lsqt Lsqt) Less(tt Tt) bool

func (Lsqt) LessLsqt

func (lsqt Lsqt) LessLsqt(lsqt2 Lsqt) bool

func (Lsqt) Tt

func (lsqt Lsqt) Tt() Tt

func (Lsqt) Vt

func (lsqt Lsqt) Vt() Vt

type ObjectId

type ObjectId string

func (ObjectId) String

func (oid ObjectId) String() string

func (ObjectId) Valid

func (oid ObjectId) Valid() bool

Valid returns true if the ObjectId is valid (not an empty string) and false otherwise.

type Percentile

type Percentile float64

type ProjectedFieldKey

type ProjectedFieldKey string

type ProjectedFieldValue

type ProjectedFieldValue struct {
    Int64   *int64
    Int32   *int32
    Float64 *float64
    Float32 *float32
}

func NewFloat32ProjectedFieldValue

func NewFloat32ProjectedFieldValue(f float32) *ProjectedFieldValue

func NewFloat64ProjectedFieldValue

func NewFloat64ProjectedFieldValue(f float64) *ProjectedFieldValue

func NewInt32ProjectedFieldValue

func NewInt32ProjectedFieldValue(i int32) *ProjectedFieldValue

func NewInt64ProjectedFieldValue

func NewInt64ProjectedFieldValue(i int64) *ProjectedFieldValue

type StringIndexValue

type StringIndexValue string

type TemporalCoordinates

type TemporalCoordinates struct {
    Tt Tt
    Vt Vt
}

func NewTemporalCoordinates

func NewTemporalCoordinates(tt Tt, vt Vt) *TemporalCoordinates

type TimesliceId

type TimesliceId string

func (TimesliceId) Greater

func (tsId TimesliceId) Greater(tsId2 TimesliceId) bool

func (TimesliceId) Less

func (tsId TimesliceId) Less(tsId2 TimesliceId) bool

type TimestampIndexValue

type TimestampIndexValue int64

func TimeToTimestampIndexValue

func TimeToTimestampIndexValue(t *time.Time) TimestampIndexValue

type Tt

type Tt int64

func TtOf

func TtOf(t time.Time) Tt

func (Tt) Equal

func (tt Tt) Equal(tt2 Tt) bool

func (Tt) Greater

func (tt Tt) Greater(tt2 Tt) bool

func (Tt) GreaterEqual

func (tt Tt) GreaterEqual(tt2 Tt) bool

func (Tt) Less

func (tt Tt) Less(tt2 Tt) bool

func (Tt) LessEqual

func (tt Tt) LessEqual(tt2 Tt) bool

func (Tt) String

func (tt Tt) String() string

type Vt

type Vt int64

func VtOf

func VtOf(t time.Time) Vt

func (Vt) Equal

func (vt Vt) Equal(vt2 Vt) bool

func (Vt) Greater

func (vt Vt) Greater(vt2 Vt) bool

func (Vt) GreaterEqual

func (vt Vt) GreaterEqual(vt2 Vt) bool

func (Vt) Less

func (vt Vt) Less(vt2 Vt) bool

func (Vt) LessEqual

func (vt Vt) LessEqual(vt2 Vt) bool

func (Vt) String

func (vt Vt) String() string

Subdirectories

Name Synopsis
..
entitlements Package entitlements provides methods for adding and modifying entitlements to data stored in TwiceDB.
object_registry Package object_registry defines the ObjectRegistry that allows the TwiceDB client to deserialize objects into the correct classes.