generator

package
v0.0.0-...-1d8a72d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2014 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidOptions = errors.New("invalid options")
)

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func Generate

func Generate(opts *Options, version string) error

Types

type Binding

type Binding struct {
	Name string
}

type ByComponentIndex

type ByComponentIndex []Column

func (ByComponentIndex) Len

func (a ByComponentIndex) Len() int

func (ByComponentIndex) Less

func (a ByComponentIndex) Less(i, j int) bool

func (ByComponentIndex) Swap

func (a ByComponentIndex) Swap(i, j int)

type Column

type Column struct {
	Name            string
	KeyType         ColumnKeyType
	DataType        ColumnDataType
	ComponentIndex  int
	IsLastComponent bool
	SecondaryIndex  bool
}

func (*Column) SupportsClustering

func (c *Column) SupportsClustering() bool

func (*Column) SupportsPartitioning

func (c *Column) SupportsPartitioning() bool

type ColumnDataType

type ColumnDataType uint
const (
	StringType    ColumnDataType = 1
	Int32Type     ColumnDataType = 2
	LongType      ColumnDataType = 3
	FloatType     ColumnDataType = 4
	DoubleType    ColumnDataType = 5
	TimestampType ColumnDataType = 6
	BooleanType   ColumnDataType = 7
	TimeUUIDType  ColumnDataType = 8
	CounterType   ColumnDataType = 9
	MapType       ColumnDataType = 10
	ArrayType     ColumnDataType = 11
	BytesType     ColumnDataType = 12
	DecimalType   ColumnDataType = 13
	ReversedType  ColumnDataType = 14
)

type ColumnFamily

type ColumnFamily struct {
	Name      string
	Columns   []Column
	IsCounter bool
}

func ColumnFamilies

func ColumnFamilies(opts *Options) ([]ColumnFamily, error)

type ColumnKeyType

type ColumnKeyType uint
const (
	PartitionKey  ColumnKeyType = 1
	ClusteringKey ColumnKeyType = 2
	RegularColumn ColumnKeyType = 3
)

type Options

type Options struct {
	Instance string `short:"i" long:"instance" description:"The Cassandra instance to connect to"`
	Keyspace string `short:"k" long:"keyspace" description:"The keyspace that contains the target schema"`
	Package  string `short:"p" long:"package" description:"The name of the target package for the generated code"`
	Output   string `short:"o" long:"output" description:"The file to write the generated bindings to"`
	Version  func() `short:"V" long:"version" description:"Print cqlc version and exit"`
	Verbose  []bool `short:"v" long:"verbose" description:"Show verbose debug information"`
	Symbols  bool   `short:"s" long:"symbols" description:"Generate compile symbols for each column family"`
	Username string `short:"u" long:"username" description:"Username for authentication"`
	Password string `short:"w" long:"password" description:"Password for authentication"`
}

type Provenance

type Provenance struct {
	Version   string
	Timestamp time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL