rename internal Frame to Field

This commit is contained in:
Travis Turner 2018-06-05 23:13:49 -05:00
parent 4254eb1d11
commit 636bf252ad
No known key found for this signature in database
GPG key ID: 7F08008DFD9314C9
3 changed files with 61 additions and 61 deletions

View file

@ -971,8 +971,8 @@ func (f *Field) ImportValue(columnIDs []uint64, values []int64) error {
}
// encodeFields converts a into its internal representation.
func encodeFields(a []*Field) []*internal.Frame {
other := make([]*internal.Frame, len(a))
func encodeFields(a []*Field) []*internal.Field {
other := make([]*internal.Field, len(a))
for i := range a {
other[i] = encodeField(a[i])
}
@ -980,9 +980,9 @@ func encodeFields(a []*Field) []*internal.Frame {
}
// encodeField converts f into its internal representation.
func encodeField(f *Field) *internal.Frame {
func encodeField(f *Field) *internal.Field {
fo := f.options
return &internal.Frame{
return &internal.Field{
Name: f.name,
Meta: fo.Encode(),
Views: f.viewNames(),

View file

@ -21,7 +21,7 @@
CreateIndexMessage
CreateFrameMessage
DeleteFrameMessage
Frame
Field
Schema
Index
URI
@ -364,32 +364,32 @@ func (m *DeleteFrameMessage) GetFrame() string {
return ""
}
type Frame struct {
type Field struct {
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
Meta *FieldOptions `protobuf:"bytes,2,opt,name=Meta" json:"Meta,omitempty"`
Views []string `protobuf:"bytes,3,rep,name=Views" json:"Views,omitempty"`
}
func (m *Frame) Reset() { *m = Frame{} }
func (m *Frame) String() string { return proto.CompactTextString(m) }
func (*Frame) ProtoMessage() {}
func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{12} }
func (m *Field) Reset() { *m = Field{} }
func (m *Field) String() string { return proto.CompactTextString(m) }
func (*Field) ProtoMessage() {}
func (*Field) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{12} }
func (m *Frame) GetName() string {
func (m *Field) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Frame) GetMeta() *FieldOptions {
func (m *Field) GetMeta() *FieldOptions {
if m != nil {
return m.Meta
}
return nil
}
func (m *Frame) GetViews() []string {
func (m *Field) GetViews() []string {
if m != nil {
return m.Views
}
@ -414,7 +414,7 @@ func (m *Schema) GetIndexes() []*Index {
type Index struct {
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
Frames []*Frame `protobuf:"bytes,4,rep,name=Frames" json:"Frames,omitempty"`
Frames []*Field `protobuf:"bytes,4,rep,name=Frames" json:"Frames,omitempty"`
}
func (m *Index) Reset() { *m = Index{} }
@ -429,7 +429,7 @@ func (m *Index) GetName() string {
return ""
}
func (m *Index) GetFrames() []*Frame {
func (m *Index) GetFrames() []*Field {
if m != nil {
return m.Frames
}
@ -931,7 +931,7 @@ func init() {
proto.RegisterType((*CreateIndexMessage)(nil), "internal.CreateIndexMessage")
proto.RegisterType((*CreateFrameMessage)(nil), "internal.CreateFrameMessage")
proto.RegisterType((*DeleteFrameMessage)(nil), "internal.DeleteFrameMessage")
proto.RegisterType((*Frame)(nil), "internal.Frame")
proto.RegisterType((*Field)(nil), "internal.Field")
proto.RegisterType((*Schema)(nil), "internal.Schema")
proto.RegisterType((*Index)(nil), "internal.Index")
proto.RegisterType((*URI)(nil), "internal.URI")
@ -1368,7 +1368,7 @@ func (m *DeleteFrameMessage) MarshalTo(dAtA []byte) (int, error) {
return i, nil
}
func (m *Frame) Marshal() (dAtA []byte, err error) {
func (m *Field) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
@ -1378,7 +1378,7 @@ func (m *Frame) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *Frame) MarshalTo(dAtA []byte) (int, error) {
func (m *Field) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
@ -2315,7 +2315,7 @@ func (m *DeleteFrameMessage) Size() (n int) {
return n
}
func (m *Frame) Size() (n int) {
func (m *Field) Size() (n int) {
var l int
_ = l
l = len(m.Name)
@ -4124,7 +4124,7 @@ func (m *DeleteFrameMessage) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *Frame) Unmarshal(dAtA []byte) error {
func (m *Field) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@ -4147,10 +4147,10 @@ func (m *Frame) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Frame: wiretype end group for non-group")
return fmt.Errorf("proto: Field: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Frame: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -4430,7 +4430,7 @@ func (m *Index) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Frames = append(m.Frames, &Frame{})
m.Frames = append(m.Frames, &Field{})
if err := m.Frames[len(m.Frames)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@ -6617,7 +6617,7 @@ var (
func init() { proto.RegisterFile("private.proto", fileDescriptorPrivate) }
var fileDescriptorPrivate = []byte{
// 1011 bytes of a gzipped FileDescriptorProto
// 1013 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcb, 0x6f, 0x1c, 0x35,
0x18, 0x67, 0x1e, 0xbb, 0xd9, 0xfd, 0xd2, 0x0d, 0x89, 0x0b, 0x61, 0x8a, 0x50, 0x58, 0xac, 0x4a,
0x0d, 0x3d, 0x44, 0xa5, 0xbd, 0xf0, 0xaa, 0x14, 0x25, 0x9b, 0xc2, 0x20, 0x12, 0xc0, 0x93, 0xf4,
@ -6647,39 +6647,39 @@ var fileDescriptorPrivate = []byte{
0xef, 0x03, 0x19, 0x89, 0x44, 0x28, 0x61, 0xf1, 0xf8, 0x1a, 0x0f, 0x34, 0xaa, 0xa2, 0x5d, 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f, 0xff, 0x6c,
0xbc, 0xf5, 0xbc, 0x8b, 0x3f, 0xda, 0x47, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xab, 0x64, 0x15,
0x6e, 0xe2, 0x0a, 0x00, 0x00,
}

View file

@ -64,7 +64,7 @@ message DeleteFrameMessage {
string Frame = 2;
}
message Frame {
message Field {
string Name = 1;
FieldOptions Meta = 2;
repeated string Views = 3;
@ -76,7 +76,7 @@ message Schema {
message Index {
string Name = 1;
repeated Frame Frames = 4;
repeated Field Frames = 4;
}
message URI {