blob: 71ec8b6e798b429a288576af47a9b294b69224d3 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file was auto-generated by the vanadium vdl tool.
// Source: types.vdl
package nosql
import (
// VDL system imports
"v.io/v23/vdl"
// VDL user imports
"v.io/v23/security/access"
)
// BatchOptions configures a batch.
// TODO(sadovsky): Add more options, e.g. to configure isolation, timeouts,
// whether to track the read set and/or write set, etc.
// TODO(sadovsky): Maybe add a DefaultBatchOptions() function that initializes
// BatchOptions with our desired defaults. Clients would be encouraged to
// initialize their BatchOptions object using that function and then modify it
// to their liking.
type BatchOptions struct {
// Arbitrary string, typically used to describe the intent behind a batch.
// Hints are surfaced to clients during conflict resolution.
Hint string
// ReadOnly specifies whether the batch should allow writes.
// If ReadOnly is set to true, Abort() should be used to release any resources
// associated with this batch (though it is not strictly required), and
// Commit() will always fail.
ReadOnly bool
}
func (BatchOptions) __VDLReflect(struct {
Name string `vdl:"v.io/syncbase/v23/services/syncbase/nosql.BatchOptions"`
}) {
}
// PrefixPermissions represents a pair of (prefix, perms).
type PrefixPermissions struct {
Prefix string
Perms access.Permissions
}
func (PrefixPermissions) __VDLReflect(struct {
Name string `vdl:"v.io/syncbase/v23/services/syncbase/nosql.PrefixPermissions"`
}) {
}
// KeyValue is a key-value pair.
type KeyValue struct {
Key string
Value []byte
}
func (KeyValue) __VDLReflect(struct {
Name string `vdl:"v.io/syncbase/v23/services/syncbase/nosql.KeyValue"`
}) {
}
// SyncGroupSpec contains the specification for a SyncGroup.
type SyncGroupSpec struct {
// Human readable description.
Description string
// Permissions for the SyncGroup.
Perms access.Permissions
// SyncGroup prefixes (relative to the database). Prefixes
// must take the form "<tableName>/<rowKeyPrefix>" where
// tableName is non-empty.
Prefixes []string
// Mount tables at which to advertise this SyncGroup. These
// are the mount tables used for rendezvous in addition to the
// one in the neighborhood. Typically, we will have only one
// entry. However, an array allows mount tables to be changed
// over time.
//
// TODO(hpucha): Figure out a convention for
// advertising SyncGroups in the mount table.
MountTables []string
// Option to change the privacy of the SyncGroup. Configures
// whether blobs in a SyncGroup can be served to clients
// holding blobrefs obtained from other SyncGroups.
IsPrivate bool
}
func (SyncGroupSpec) __VDLReflect(struct {
Name string `vdl:"v.io/syncbase/v23/services/syncbase/nosql.SyncGroupSpec"`
}) {
}
// SyncGroupMemberInfo contains per-member metadata.
type SyncGroupMemberInfo struct {
SyncPriority byte
}
func (SyncGroupMemberInfo) __VDLReflect(struct {
Name string `vdl:"v.io/syncbase/v23/services/syncbase/nosql.SyncGroupMemberInfo"`
}) {
}
func init() {
vdl.Register((*BatchOptions)(nil))
vdl.Register((*PrefixPermissions)(nil))
vdl.Register((*KeyValue)(nil))
vdl.Register((*SyncGroupSpec)(nil))
vdl.Register((*SyncGroupMemberInfo)(nil))
}