Documentation
¶
Index ¶
- Variables
- func BQSchema(fields []*FieldSchema) bigquery.Schema
- type FieldSchema
- func (*FieldSchema) Descriptor() ([]byte, []int)deprecated
- func (x *FieldSchema) GetDescription() string
- func (x *FieldSchema) GetIsRepeated() bool
- func (x *FieldSchema) GetIsRequired() bool
- func (x *FieldSchema) GetName() string
- func (x *FieldSchema) GetSchema() []*FieldSchema
- func (x *FieldSchema) GetType() Type
- func (*FieldSchema) ProtoMessage()
- func (x *FieldSchema) ProtoReflect() protoreflect.Message
- func (x *FieldSchema) Reset()
- func (x *FieldSchema) String() string
- type TableDef
- func (*TableDef) Descriptor() ([]byte, []int)deprecated
- func (x *TableDef) GetDatasetId() string
- func (x *TableDef) GetDescription() string
- func (x *TableDef) GetFields() []*FieldSchema
- func (x *TableDef) GetName() string
- func (x *TableDef) GetPartitionExpirationSeconds() int64
- func (x *TableDef) GetPartitionTable() bool
- func (x *TableDef) GetTableId() string
- func (*TableDef) ProtoMessage()
- func (x *TableDef) ProtoReflect() protoreflect.Message
- func (x *TableDef) Reset()
- func (x *TableDef) String() string
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Type_name = map[int32]string{ 0: "STRING", 1: "BYTES", 2: "INTEGER", 3: "FLOAT", 4: "BOOLEAN", 5: "TIMESTAMP", 6: "RECORD", 7: "DATE", 8: "TIME", 9: "DATETIME", } Type_value = map[string]int32{ "STRING": 0, "BYTES": 1, "INTEGER": 2, "FLOAT": 3, "BOOLEAN": 4, "TIMESTAMP": 5, "RECORD": 6, "DATE": 7, "TIME": 8, "DATETIME": 9, } )
Enum value maps for Type.
View Source
var File_infra_libs_bqschema_tabledef_table_def_proto protoreflect.FileDescriptor
Functions ¶
func BQSchema ¶
func BQSchema(fields []*FieldSchema) bigquery.Schema
BQSchema constructs a bigquery.Schema from a []*TableDef.FieldSchema
Types ¶
type FieldSchema ¶
type FieldSchema struct { // Name of the field/column. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Human-readable description of the field. (optional) Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` IsRepeated bool `protobuf:"varint,3,opt,name=is_repeated,json=isRepeated,proto3" json:"is_repeated,omitempty"` IsRequired bool `protobuf:"varint,4,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` Type Type `protobuf:"varint,5,opt,name=type,proto3,enum=tabledef.Type" json:"type,omitempty"` Schema []*FieldSchema `protobuf:"bytes,6,rep,name=schema,proto3" json:"schema,omitempty"` // contains filtered or unexported fields }
func (*FieldSchema) Descriptor
deprecated
func (*FieldSchema) Descriptor() ([]byte, []int)
Deprecated: Use FieldSchema.ProtoReflect.Descriptor instead.
func (*FieldSchema) GetDescription ¶
func (x *FieldSchema) GetDescription() string
func (*FieldSchema) GetIsRepeated ¶
func (x *FieldSchema) GetIsRepeated() bool
func (*FieldSchema) GetIsRequired ¶
func (x *FieldSchema) GetIsRequired() bool
func (*FieldSchema) GetName ¶
func (x *FieldSchema) GetName() string
func (*FieldSchema) GetSchema ¶
func (x *FieldSchema) GetSchema() []*FieldSchema
func (*FieldSchema) GetType ¶
func (x *FieldSchema) GetType() Type
func (*FieldSchema) ProtoMessage ¶
func (*FieldSchema) ProtoMessage()
func (*FieldSchema) ProtoReflect ¶
func (x *FieldSchema) ProtoReflect() protoreflect.Message
func (*FieldSchema) Reset ¶
func (x *FieldSchema) Reset()
func (*FieldSchema) String ¶
func (x *FieldSchema) String() string
type TableDef ¶
type TableDef struct { // Name of the dataset. DatasetId string `protobuf:"bytes,1,opt,name=dataset_id,json=datasetId,proto3" json:"dataset_id,omitempty"` // Name of the table. TableId string `protobuf:"bytes,2,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` // Human-readable name of the table. (optional) Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // Human-readable description of the table. (optional) Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` Fields []*FieldSchema `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"` // Whether to partition the table by day. PartitionTable bool `protobuf:"varint,6,opt,name=partition_table,json=partitionTable,proto3" json:"partition_table,omitempty"` // The lifetime for each partition. If zero, partitions do not expire. // Ignored if partition_table is false. (optional) PartitionExpirationSeconds int64 `` /* 142-byte string literal not displayed */ // contains filtered or unexported fields }
func (*TableDef) Descriptor
deprecated
func (*TableDef) GetDatasetId ¶
func (*TableDef) GetDescription ¶
func (*TableDef) GetFields ¶
func (x *TableDef) GetFields() []*FieldSchema
func (*TableDef) GetPartitionExpirationSeconds ¶
func (*TableDef) GetPartitionTable ¶
func (*TableDef) GetTableId ¶
func (*TableDef) ProtoMessage ¶
func (*TableDef) ProtoMessage()
func (*TableDef) ProtoReflect ¶
func (x *TableDef) ProtoReflect() protoreflect.Message
type Type ¶
type Type int32
func (Type) Descriptor ¶
func (Type) Descriptor() protoreflect.EnumDescriptor
func (Type) EnumDescriptor
deprecated
func (Type) Number ¶
func (x Type) Number() protoreflect.EnumNumber
func (Type) Type ¶
func (Type) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.