From eb79c736c6148c280e3339a22a74fe30fff39876 Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Mon, 14 Jan 2019 14:26:38 +0100 Subject: [PATCH] feat: port crew --- api/api.pb.go | 307 +++----- api/api.proto | 4 +- pkg/crew/crew.go | 151 ++-- pkg/crew/crew.pb.go | 1690 +++++++++++++++++++++++++++++++++++++++++++ pkg/crew/crew.proto | 46 ++ svc/svc.go | 5 +- 6 files changed, 1903 insertions(+), 300 deletions(-) create mode 100644 pkg/crew/crew.pb.go create mode 100644 pkg/crew/crew.proto diff --git a/api/api.pb.go b/api/api.pb.go index 6df759cd..d76b53c5 100644 --- a/api/api.pb.go +++ b/api/api.pb.go @@ -8,6 +8,7 @@ import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" import _ "google.golang.org/genproto/googleapis/api/annotations" +import crew "ultre.me/calcbiz/pkg/crew" import ( context "golang.org/x/net/context" @@ -34,7 +35,7 @@ func (m *Void) Reset() { *m = Void{} } func (m *Void) String() string { return proto.CompactTextString(m) } func (*Void) ProtoMessage() {} func (*Void) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{0} + return fileDescriptor_api_a60198e59ba81f1d, []int{0} } func (m *Void) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -71,7 +72,7 @@ func (m *Pong) Reset() { *m = Pong{} } func (m *Pong) String() string { return proto.CompactTextString(m) } func (*Pong) ProtoMessage() {} func (*Pong) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{1} + return fileDescriptor_api_a60198e59ba81f1d, []int{1} } func (m *Pong) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,42 +108,6 @@ func (m *Pong) GetPong() string { return "" } -type CrewOutput struct { -} - -func (m *CrewOutput) Reset() { *m = CrewOutput{} } -func (m *CrewOutput) String() string { return proto.CompactTextString(m) } -func (*CrewOutput) ProtoMessage() {} -func (*CrewOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{2} -} -func (m *CrewOutput) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CrewOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CrewOutput.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *CrewOutput) XXX_Merge(src proto.Message) { - xxx_messageInfo_CrewOutput.Merge(dst, src) -} -func (m *CrewOutput) XXX_Size() int { - return m.Size() -} -func (m *CrewOutput) XXX_DiscardUnknown() { - xxx_messageInfo_CrewOutput.DiscardUnknown(m) -} - -var xxx_messageInfo_CrewOutput proto.InternalMessageInfo - type KryptosInput struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` } @@ -151,7 +116,7 @@ func (m *KryptosInput) Reset() { *m = KryptosInput{} } func (m *KryptosInput) String() string { return proto.CompactTextString(m) } func (*KryptosInput) ProtoMessage() {} func (*KryptosInput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{3} + return fileDescriptor_api_a60198e59ba81f1d, []int{2} } func (m *KryptosInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -195,7 +160,7 @@ func (m *KryptosOutput) Reset() { *m = KryptosOutput{} } func (m *KryptosOutput) String() string { return proto.CompactTextString(m) } func (*KryptosOutput) ProtoMessage() {} func (*KryptosOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{4} + return fileDescriptor_api_a60198e59ba81f1d, []int{3} } func (m *KryptosOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -239,7 +204,7 @@ func (m *TpyoEnocdeIpunt) Reset() { *m = TpyoEnocdeIpunt{} } func (m *TpyoEnocdeIpunt) String() string { return proto.CompactTextString(m) } func (*TpyoEnocdeIpunt) ProtoMessage() {} func (*TpyoEnocdeIpunt) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{5} + return fileDescriptor_api_a60198e59ba81f1d, []int{4} } func (m *TpyoEnocdeIpunt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -283,7 +248,7 @@ func (m *TpyoEnocdeOuptut) Reset() { *m = TpyoEnocdeOuptut{} } func (m *TpyoEnocdeOuptut) String() string { return proto.CompactTextString(m) } func (*TpyoEnocdeOuptut) ProtoMessage() {} func (*TpyoEnocdeOuptut) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{6} + return fileDescriptor_api_a60198e59ba81f1d, []int{5} } func (m *TpyoEnocdeOuptut) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +291,7 @@ func (m *DahsboardRandomOutput) Reset() { *m = DahsboardRandomOutput{} } func (m *DahsboardRandomOutput) String() string { return proto.CompactTextString(m) } func (*DahsboardRandomOutput) ProtoMessage() {} func (*DahsboardRandomOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{7} + return fileDescriptor_api_a60198e59ba81f1d, []int{6} } func (m *DahsboardRandomOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -363,7 +328,7 @@ func (m *NumberinfoInput) Reset() { *m = NumberinfoInput{} } func (m *NumberinfoInput) String() string { return proto.CompactTextString(m) } func (*NumberinfoInput) ProtoMessage() {} func (*NumberinfoInput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{8} + return fileDescriptor_api_a60198e59ba81f1d, []int{7} } func (m *NumberinfoInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -406,7 +371,7 @@ func (m *NumberinfoOutput) Reset() { *m = NumberinfoOutput{} } func (m *NumberinfoOutput) String() string { return proto.CompactTextString(m) } func (*NumberinfoOutput) ProtoMessage() {} func (*NumberinfoOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{9} + return fileDescriptor_api_a60198e59ba81f1d, []int{8} } func (m *NumberinfoOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +408,7 @@ func (m *MoijaimeOutput) Reset() { *m = MoijaimeOutput{} } func (m *MoijaimeOutput) String() string { return proto.CompactTextString(m) } func (*MoijaimeOutput) ProtoMessage() {} func (*MoijaimeOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{10} + return fileDescriptor_api_a60198e59ba81f1d, []int{9} } func (m *MoijaimeOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -487,7 +452,7 @@ func (m *WotdOutput) Reset() { *m = WotdOutput{} } func (m *WotdOutput) String() string { return proto.CompactTextString(m) } func (*WotdOutput) ProtoMessage() {} func (*WotdOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{11} + return fileDescriptor_api_a60198e59ba81f1d, []int{10} } func (m *WotdOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -531,7 +496,7 @@ func (m *AlternateLogoOutput) Reset() { *m = AlternateLogoOutput{} } func (m *AlternateLogoOutput) String() string { return proto.CompactTextString(m) } func (*AlternateLogoOutput) ProtoMessage() {} func (*AlternateLogoOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{12} + return fileDescriptor_api_a60198e59ba81f1d, []int{11} } func (m *AlternateLogoOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -574,7 +539,7 @@ func (m *DahsboardOutput) Reset() { *m = DahsboardOutput{} } func (m *DahsboardOutput) String() string { return proto.CompactTextString(m) } func (*DahsboardOutput) ProtoMessage() {} func (*DahsboardOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{13} + return fileDescriptor_api_a60198e59ba81f1d, []int{12} } func (m *DahsboardOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +576,7 @@ func (m *RecettatorInput) Reset() { *m = RecettatorInput{} } func (m *RecettatorInput) String() string { return proto.CompactTextString(m) } func (*RecettatorInput) ProtoMessage() {} func (*RecettatorInput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{14} + return fileDescriptor_api_a60198e59ba81f1d, []int{13} } func (m *RecettatorInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -654,7 +619,7 @@ func (m *RecettatorOutput) Reset() { *m = RecettatorOutput{} } func (m *RecettatorOutput) String() string { return proto.CompactTextString(m) } func (*RecettatorOutput) ProtoMessage() {} func (*RecettatorOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{15} + return fileDescriptor_api_a60198e59ba81f1d, []int{14} } func (m *RecettatorOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -690,7 +655,7 @@ func (m *DashboardOutput) Reset() { *m = DashboardOutput{} } func (m *DashboardOutput) String() string { return proto.CompactTextString(m) } func (*DashboardOutput) ProtoMessage() {} func (*DashboardOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{16} + return fileDescriptor_api_a60198e59ba81f1d, []int{15} } func (m *DashboardOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -726,7 +691,7 @@ func (m *SpreadshirtRandomOutput) Reset() { *m = SpreadshirtRandomOutput func (m *SpreadshirtRandomOutput) String() string { return proto.CompactTextString(m) } func (*SpreadshirtRandomOutput) ProtoMessage() {} func (*SpreadshirtRandomOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{17} + return fileDescriptor_api_a60198e59ba81f1d, []int{16} } func (m *SpreadshirtRandomOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -762,7 +727,7 @@ func (m *SpreadshirtAllOutput) Reset() { *m = SpreadshirtAllOutput{} } func (m *SpreadshirtAllOutput) String() string { return proto.CompactTextString(m) } func (*SpreadshirtAllOutput) ProtoMessage() {} func (*SpreadshirtAllOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{18} + return fileDescriptor_api_a60198e59ba81f1d, []int{17} } func (m *SpreadshirtAllOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -798,7 +763,7 @@ func (m *SoundcloudMeOutput) Reset() { *m = SoundcloudMeOutput{} } func (m *SoundcloudMeOutput) String() string { return proto.CompactTextString(m) } func (*SoundcloudMeOutput) ProtoMessage() {} func (*SoundcloudMeOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{19} + return fileDescriptor_api_a60198e59ba81f1d, []int{18} } func (m *SoundcloudMeOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -834,7 +799,7 @@ func (m *SoundcloudPlaylistsOutput) Reset() { *m = SoundcloudPlaylistsOu func (m *SoundcloudPlaylistsOutput) String() string { return proto.CompactTextString(m) } func (*SoundcloudPlaylistsOutput) ProtoMessage() {} func (*SoundcloudPlaylistsOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{20} + return fileDescriptor_api_a60198e59ba81f1d, []int{19} } func (m *SoundcloudPlaylistsOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -870,7 +835,7 @@ func (m *SoundcloudPlaylistOutput) Reset() { *m = SoundcloudPlaylistOutp func (m *SoundcloudPlaylistOutput) String() string { return proto.CompactTextString(m) } func (*SoundcloudPlaylistOutput) ProtoMessage() {} func (*SoundcloudPlaylistOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{21} + return fileDescriptor_api_a60198e59ba81f1d, []int{20} } func (m *SoundcloudPlaylistOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -906,7 +871,7 @@ func (m *SoundcloudTracksOutput) Reset() { *m = SoundcloudTracksOutput{} func (m *SoundcloudTracksOutput) String() string { return proto.CompactTextString(m) } func (*SoundcloudTracksOutput) ProtoMessage() {} func (*SoundcloudTracksOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{22} + return fileDescriptor_api_a60198e59ba81f1d, []int{21} } func (m *SoundcloudTracksOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -942,7 +907,7 @@ func (m *SoundcloudTrackOutput) Reset() { *m = SoundcloudTrackOutput{} } func (m *SoundcloudTrackOutput) String() string { return proto.CompactTextString(m) } func (*SoundcloudTrackOutput) ProtoMessage() {} func (*SoundcloudTrackOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{23} + return fileDescriptor_api_a60198e59ba81f1d, []int{22} } func (m *SoundcloudTrackOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -979,7 +944,7 @@ func (m *SoundcloudPlaylistInput) Reset() { *m = SoundcloudPlaylistInput func (m *SoundcloudPlaylistInput) String() string { return proto.CompactTextString(m) } func (*SoundcloudPlaylistInput) ProtoMessage() {} func (*SoundcloudPlaylistInput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{24} + return fileDescriptor_api_a60198e59ba81f1d, []int{23} } func (m *SoundcloudPlaylistInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1023,7 +988,7 @@ func (m *SoundcloudTrackInput) Reset() { *m = SoundcloudTrackInput{} } func (m *SoundcloudTrackInput) String() string { return proto.CompactTextString(m) } func (*SoundcloudTrackInput) ProtoMessage() {} func (*SoundcloudTrackInput) Descriptor() ([]byte, []int) { - return fileDescriptor_api_0c0ca6419dfaf57b, []int{25} + return fileDescriptor_api_a60198e59ba81f1d, []int{24} } func (m *SoundcloudTrackInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1062,7 +1027,6 @@ func (m *SoundcloudTrackInput) GetTrackId() string { func init() { proto.RegisterType((*Void)(nil), "calcbiz.server.Void") proto.RegisterType((*Pong)(nil), "calcbiz.server.Pong") - proto.RegisterType((*CrewOutput)(nil), "calcbiz.server.CrewOutput") proto.RegisterType((*KryptosInput)(nil), "calcbiz.server.KryptosInput") proto.RegisterType((*KryptosOutput)(nil), "calcbiz.server.KryptosOutput") proto.RegisterType((*TpyoEnocdeIpunt)(nil), "calcbiz.server.TpyoEnocdeIpunt") @@ -1105,7 +1069,7 @@ type ServerClient interface { TpyoEnocde(ctx context.Context, in *TpyoEnocdeIpunt, opts ...grpc.CallOption) (*TpyoEnocdeOuptut, error) Ping(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Pong, error) Dashboard(ctx context.Context, in *Void, opts ...grpc.CallOption) (*DashboardOutput, error) - Crew(ctx context.Context, in *Void, opts ...grpc.CallOption) (*CrewOutput, error) + Crew(ctx context.Context, in *Void, opts ...grpc.CallOption) (*crew.Crew, error) Numberinfo(ctx context.Context, in *NumberinfoInput, opts ...grpc.CallOption) (*NumberinfoOutput, error) Recettator(ctx context.Context, in *RecettatorInput, opts ...grpc.CallOption) (*RecettatorOutput, error) Moijaime(ctx context.Context, in *Void, opts ...grpc.CallOption) (*MoijaimeOutput, error) @@ -1173,8 +1137,8 @@ func (c *serverClient) Dashboard(ctx context.Context, in *Void, opts ...grpc.Cal return out, nil } -func (c *serverClient) Crew(ctx context.Context, in *Void, opts ...grpc.CallOption) (*CrewOutput, error) { - out := new(CrewOutput) +func (c *serverClient) Crew(ctx context.Context, in *Void, opts ...grpc.CallOption) (*crew.Crew, error) { + out := new(crew.Crew) err := c.cc.Invoke(ctx, "/calcbiz.server.Server/Crew", in, out, opts...) if err != nil { return nil, err @@ -1297,7 +1261,7 @@ type ServerServer interface { TpyoEnocde(context.Context, *TpyoEnocdeIpunt) (*TpyoEnocdeOuptut, error) Ping(context.Context, *Void) (*Pong, error) Dashboard(context.Context, *Void) (*DashboardOutput, error) - Crew(context.Context, *Void) (*CrewOutput, error) + Crew(context.Context, *Void) (*crew.Crew, error) Numberinfo(context.Context, *NumberinfoInput) (*NumberinfoOutput, error) Recettator(context.Context, *RecettatorInput) (*RecettatorOutput, error) Moijaime(context.Context, *Void) (*MoijaimeOutput, error) @@ -1763,24 +1727,6 @@ func (m *Pong) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *CrewOutput) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CrewOutput) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - return i, nil -} - func (m *KryptosInput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2300,15 +2246,6 @@ func (m *Pong) Size() (n int) { return n } -func (m *CrewOutput) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *KryptosInput) Size() (n int) { if m == nil { return 0 @@ -2703,56 +2640,6 @@ func (m *Pong) Unmarshal(dAtA []byte) error { } return nil } -func (m *CrewOutput) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CrewOutput: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CrewOutput: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *KryptosInput) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4317,71 +4204,71 @@ var ( ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("api/api.proto", fileDescriptor_api_0c0ca6419dfaf57b) } - -var fileDescriptor_api_0c0ca6419dfaf57b = []byte{ - // 995 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0xb6, 0x1c, 0xfd, 0xfe, 0xe3, 0x13, 0x5b, 0xb2, 0xc7, 0xb2, 0x2e, 0xb4, 0x2b, 0x2b, 0x93, - 0x38, 0xb6, 0x0b, 0x44, 0x44, 0xdb, 0x5d, 0x76, 0x69, 0xe3, 0x85, 0x91, 0xa6, 0x31, 0xe4, 0xa0, - 0x01, 0xb2, 0x29, 0x28, 0x72, 0x44, 0x31, 0xa6, 0x38, 0x2c, 0x39, 0xac, 0xe1, 0x1a, 0xde, 0x74, - 0xd7, 0x5d, 0x81, 0x6e, 0xf2, 0x48, 0x5d, 0x06, 0xe8, 0xa6, 0xcb, 0xc2, 0xee, 0x83, 0x14, 0x73, - 0xe1, 0x45, 0x43, 0xb1, 0xee, 0xa6, 0xbb, 0x99, 0x73, 0xf9, 0xbe, 0x33, 0x87, 0xe7, 0x42, 0x58, - 0xb7, 0x42, 0xcf, 0xb4, 0x42, 0x6f, 0x18, 0x46, 0x94, 0x51, 0xd4, 0xb0, 0x2d, 0xdf, 0x1e, 0x7b, - 0x3f, 0x0e, 0x63, 0x12, 0xfd, 0x40, 0x22, 0x63, 0xd7, 0xa5, 0xd4, 0xf5, 0x89, 0x29, 0xac, 0x82, - 0x80, 0x32, 0x8b, 0x79, 0x34, 0x88, 0xa5, 0xb5, 0xf1, 0xd4, 0xf5, 0xd8, 0x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a9, 0xc3, 0xbb, 0x0d, 0x55, 0x30, 0xa6, 0x08, 0xe6, 0x08, 0x1d, 0x54, - 0x06, 0x63, 0x5e, 0x15, 0x16, 0xdc, 0x35, 0x0a, 0x61, 0x43, 0x5f, 0x9f, 0x15, 0x29, 0x79, 0x52, - 0x1d, 0xc4, 0xdc, 0xda, 0x9d, 0xef, 0xee, 0x42, 0x08, 0x4c, 0xa2, 0xff, 0x5c, 0x83, 0xa6, 0xe6, - 0x8a, 0x1e, 0xdf, 0x81, 0x2d, 0xd3, 0xb0, 0x7f, 0x87, 0x55, 0xfa, 0xa3, 0x26, 0x02, 0x78, 0x84, - 0x1e, 0x2e, 0x0e, 0xc0, 0xbc, 0x4a, 0x17, 0xf5, 0xf5, 0x97, 0xc3, 0xdf, 0x6e, 0xfa, 0xb5, 0x8f, - 0x37, 0xfd, 0xda, 0x9f, 0x37, 0xfd, 0xda, 0x2f, 0xb7, 0xfd, 0xa5, 0x8f, 0xb7, 0xfd, 0xa5, 0x3f, - 0x6e, 0xfb, 0x4b, 0xef, 0x5a, 0x89, 0xcf, 0x22, 0x32, 0x9c, 0x11, 0x53, 0x71, 0x72, 0xb0, 0xf1, - 0x8a, 0xf8, 0xcb, 0xfd, 0xe2, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x6e, 0x41, 0x1f, 0x53, - 0x0b, 0x00, 0x00, +func init() { proto.RegisterFile("api/api.proto", fileDescriptor_api_a60198e59ba81f1d) } + +var fileDescriptor_api_a60198e59ba81f1d = []byte{ + // 1001 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0xdb, 0x46, + 0x10, 0xb5, 0x1c, 0xd5, 0x8d, 0x27, 0xb1, 0x64, 0xaf, 0x65, 0x7d, 0xd0, 0xae, 0xac, 0x6c, 0xe2, + 0xd8, 0x2e, 0x10, 0x11, 0x6d, 0x6f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, 0x75, 0xb7, 0xf2, 0xf1, 0xba, 0x5b, 0xf9, 0xe7, 0xba, 0x5b, 0xf9, 0x70, 0xd3, + 0x5d, 0xfa, 0x78, 0xd3, 0x5d, 0xfa, 0xfb, 0xa6, 0xbb, 0xf4, 0xae, 0x91, 0x04, 0x9c, 0x91, 0xfe, + 0x94, 0xd8, 0x5a, 0x53, 0x90, 0x0d, 0x57, 0xe4, 0xf7, 0xec, 0x37, 0xff, 0x05, 0x00, 0x00, 0xff, + 0xff, 0xf4, 0x58, 0x71, 0x4c, 0x52, 0x0b, 0x00, 0x00, } diff --git a/api/api.proto b/api/api.proto index 2933dfe1..e65a7b1f 100644 --- a/api/api.proto +++ b/api/api.proto @@ -5,6 +5,7 @@ package calcbiz.server; import "google/api/annotations.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; //import "google/protobuf/timestamp.proto"; +import "pkg/crew/crew.proto"; option go_package = "ultre.me/calcbiz/api"; option (gogoproto.sizer_all) = true; @@ -32,7 +33,7 @@ service Server { rpc Ping(Void) returns (Pong) { option (google.api.http) = { get: "/api/ping" }; }; rpc Dashboard(Void) returns (DashboardOutput) { option (google.api.http) = {get: "/api/dashboard"}; } - rpc Crew(Void) returns (CrewOutput) { option (google.api.http) = {get: "/api/crew"}; } + rpc Crew(Void) returns (calcbiz.crew.Crew) { option (google.api.http) = {get: "/api/crew"}; } rpc Numberinfo(NumberinfoInput) returns (NumberinfoOutput) { option (google.api.http) = {get: "/api/numberinfo/{number}"}; } rpc Recettator(RecettatorInput) returns (RecettatorOutput) { option (google.api.http) = {get: "/api/recettator/{seed}"}; } rpc Moijaime(Void) returns (MoijaimeOutput) { option (google.api.http) = {get: "/api/moijaime"}; } @@ -58,7 +59,6 @@ service Server { message Void {} message Pong { string pong = 1; } -message CrewOutput { /* TODO */ } message KryptosInput { string from = 1; } message KryptosOutput { string to = 1; } message TpyoEnocdeIpunt { string from = 1; } diff --git a/pkg/crew/crew.go b/pkg/crew/crew.go index 62160005..243468d3 100644 --- a/pkg/crew/crew.go +++ b/pkg/crew/crew.go @@ -1,77 +1,43 @@ -package calccrew - -type Crew struct { - Name string `json:"name"` - Website string `json:"url"` - Members map[string]Person `json:"members"` - Accounts map[string]WebAccount `json:"accounts"` - Friends map[string]Friend `json:"friends"` -} - -type Person struct { - Name string `json:"name"` -} - -type WebAccount struct { - Provider string `json:"provider"` - Handle string `json:"handle"` - URL string `json:"url"` -} - -type Link struct { - Name string `json:"name"` - URL string `json:"url"` -} - -type Friend struct { - Name string `json:"name"` - Description string `json:"description"` - LogoURL string `json:"logo-url"` - Links []Link `json:"links"` - ImageURL string `json:"image-url"` -} +package crew var CALC = Crew{ Name: "Camembert au lait crew", Website: "http://www.camembertaulaitcrew.biz", -} - -var Moul = Person{ - Name: "moul", -} - -var Sassou = Person{ - Name: "Sassou", -} - -var MXS = Person{ - Name: "MXS", -} - -func init() { - CALC.Members = map[string]Person{ - "moul": Moul, - "sassou": Sassou, - "mxs": MXS, - } - CALC.Accounts = map[string]WebAccount{ - "soundcloud": { + Members: []*Person{ + { + Key: "moul", + Name: "moul", + }, + { + Key: "sassou", + Name: "Sassou", + }, + { + Key: "mxs", + Name: "MXS", + }, + }, + Accounts: []*WebAccount{ + { + Key: "soundcloud", Provider: "SoundCloud", Handle: "camembert-au-lait-crew", URL: "https://soundcloud.com/camembert-au-lait-crew", }, - "facebook": { + { + Key: "facebook", Provider: "Facebook", Handle: "camembertaulaitcrew", URL: "https://www.facebook.com/camembertaulaitcrew/", }, - } - CALC.Friends = map[string]Friend{ - "sbrk": { + }, + Friends: []*Friend{ + { + Key: "sbrk", Name: "sbrk.org", Description: "gentil", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/sbrk.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Sbrk", URL: "http://sbrk.org", @@ -82,11 +48,12 @@ func init() { }, }, }, - "m1ch3l": { + { + Key: "m1ch3l", Name: "m1ch3l", Description: "m1ch3l est cool, m1ch3l aime les gommes.", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/m1ch3l.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Le site de m1ch3l", URL: "http://m1ch3l.biz/", @@ -97,11 +64,12 @@ func init() { }, }, }, - "salutcestcool": { + { + Key: "salutcestcool", Name: "salut c'est cool", Description: "<3<3<3<3", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/scc.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Le site de les saluts", URL: "http://salutcestcool.com", @@ -112,11 +80,12 @@ func init() { }, }, }, - "garscool": { + { + Key: "garscool", Name: "Gars Cool", Description: "je suis cool", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/garscool.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Facebook", URL: "http://facebook.com/garscool", @@ -131,33 +100,36 @@ func init() { }, }, }, - "cestmoi": { + { + Key: "cestmoi", Name: "C'est moi", Description: "hihi", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/cestmoi.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Facebook de C'est moi", URL: "http://facebook.com/cestmoi42", }, }, }, - "pardonmyfrench": { + { + Key: "pardonmyfrench", Name: "Pardon My French", Description: "je voudrais une croissant", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/pardonmyfrench.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Site officiel", URL: "http://www.pardon-my-french.fr", }, }, }, - "furrtek": { + { + Key: "furrtek", Name: "Furrtek", Description: "Avant on se faisait electrocuter, maintenant on peut se faire electroniquer", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/furrtek.png", - Links: []Link{ + Links: []*Link{ { Name: "Site officiel", URL: "http://furrtek.free.fr", @@ -168,11 +140,12 @@ func init() { }, }, }, - "tahigo": { + { + Key: "tahigo", Name: "Tahigo", Description: "Rock festif", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/tahigo.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Facebook", URL: "http://facebook.com/tahigo", @@ -183,44 +156,48 @@ func init() { }, }, }, - "spreadshirt": { + { + Key: "spreadshirt", Name: "Spreadshirt", Description: "Des produits CALC", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/spreadshirt.jpg", // FIXME: make random - Links: []Link{ + Links: []*Link{ { Name: "Des T-shirts", URL: "http://camembertaulaitcrew.spreadshirt.fr", }, }, }, - "estcequecestbientotlapero": { + { + Key: "estcequecestbientotlapero", Name: "Est-ce que c'est bientôt l'apéro ?", Description: "Outil ludique", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/apero.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Outil", URL: "http://estcequecestbientotlapero.fr", }, }, }, - "leclubdegym": { + { + Key: "leclubdegym", Name: "Le club de Gym", Description: "Collectif d'artistes et de muscles", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/club.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Facebook", URL: "http://facebook.com/legymclub", }, }, }, - "leonard": { + { + Key: "leonard", Name: "Léonard Gordon Alain Souchon de la Gomme du Camembert", Description: "Waf.", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/leonard.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Facebook", URL: "http://facebook.com/leonard.gomme", @@ -231,27 +208,29 @@ func init() { }, }, }, - "jesuispasunmonstre": { + { + Key: "jesuispasunmonstre", Name: "Je suis pas un monstre !", Description: "par Sassou Youpi", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/sassou-behance.jpg", - Links: []Link{ + Links: []*Link{ { Name: "Behance", URL: "htts://www.behance.net/sassouyoupi", }, }, }, - "vadim": { + { + Key: "vadim", Name: "Vadim", Description: "Pipi", ImageURL: "https://camembertaulaitcrew.github.io/assets/copaings/apokorounta.png", - Links: []Link{ + Links: []*Link{ { Name: "Apokorunta", URL: "http://apokorunta.free.fr/blog", }, }, }, - } + }, } diff --git a/pkg/crew/crew.pb.go b/pkg/crew/crew.pb.go new file mode 100644 index 00000000..731c6844 --- /dev/null +++ b/pkg/crew/crew.pb.go @@ -0,0 +1,1690 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pkg/crew/crew.proto + +package crew // import "ultre.me/calcbiz/pkg/crew" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "google.golang.org/genproto/googleapis/api/annotations" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Crew struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Website string `protobuf:"bytes,2,opt,name=website,proto3" json:"website,omitempty"` + Members []*Person `protobuf:"bytes,3,rep,name=members" json:"members,omitempty"` + Accounts []*WebAccount `protobuf:"bytes,4,rep,name=accounts" json:"accounts,omitempty"` + Friends []*Friend `protobuf:"bytes,5,rep,name=friends" json:"friends,omitempty"` +} + +func (m *Crew) Reset() { *m = Crew{} } +func (m *Crew) String() string { return proto.CompactTextString(m) } +func (*Crew) ProtoMessage() {} +func (*Crew) Descriptor() ([]byte, []int) { + return fileDescriptor_crew_26e212dfbbdddd43, []int{0} +} +func (m *Crew) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Crew) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Crew.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Crew) XXX_Merge(src proto.Message) { + xxx_messageInfo_Crew.Merge(dst, src) +} +func (m *Crew) XXX_Size() int { + return m.Size() +} +func (m *Crew) XXX_DiscardUnknown() { + xxx_messageInfo_Crew.DiscardUnknown(m) +} + +var xxx_messageInfo_Crew proto.InternalMessageInfo + +func (m *Crew) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Crew) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +func (m *Crew) GetMembers() []*Person { + if m != nil { + return m.Members + } + return nil +} + +func (m *Crew) GetAccounts() []*WebAccount { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *Crew) GetFriends() []*Friend { + if m != nil { + return m.Friends + } + return nil +} + +type Person struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *Person) Reset() { *m = Person{} } +func (m *Person) String() string { return proto.CompactTextString(m) } +func (*Person) ProtoMessage() {} +func (*Person) Descriptor() ([]byte, []int) { + return fileDescriptor_crew_26e212dfbbdddd43, []int{1} +} +func (m *Person) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Person) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Person.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Person) XXX_Merge(src proto.Message) { + xxx_messageInfo_Person.Merge(dst, src) +} +func (m *Person) XXX_Size() int { + return m.Size() +} +func (m *Person) XXX_DiscardUnknown() { + xxx_messageInfo_Person.DiscardUnknown(m) +} + +var xxx_messageInfo_Person proto.InternalMessageInfo + +func (m *Person) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Person) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type WebAccount struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + Handle string `protobuf:"bytes,3,opt,name=handle,proto3" json:"handle,omitempty"` + URL string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` +} + +func (m *WebAccount) Reset() { *m = WebAccount{} } +func (m *WebAccount) String() string { return proto.CompactTextString(m) } +func (*WebAccount) ProtoMessage() {} +func (*WebAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_crew_26e212dfbbdddd43, []int{2} +} +func (m *WebAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WebAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WebAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *WebAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_WebAccount.Merge(dst, src) +} +func (m *WebAccount) XXX_Size() int { + return m.Size() +} +func (m *WebAccount) XXX_DiscardUnknown() { + xxx_messageInfo_WebAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_WebAccount proto.InternalMessageInfo + +func (m *WebAccount) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *WebAccount) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +func (m *WebAccount) GetHandle() string { + if m != nil { + return m.Handle + } + return "" +} + +func (m *WebAccount) GetURL() string { + if m != nil { + return m.URL + } + return "" +} + +type Link struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + URL string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (m *Link) Reset() { *m = Link{} } +func (m *Link) String() string { return proto.CompactTextString(m) } +func (*Link) ProtoMessage() {} +func (*Link) Descriptor() ([]byte, []int) { + return fileDescriptor_crew_26e212dfbbdddd43, []int{3} +} +func (m *Link) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Link.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Link) XXX_Merge(src proto.Message) { + xxx_messageInfo_Link.Merge(dst, src) +} +func (m *Link) XXX_Size() int { + return m.Size() +} +func (m *Link) XXX_DiscardUnknown() { + xxx_messageInfo_Link.DiscardUnknown(m) +} + +var xxx_messageInfo_Link proto.InternalMessageInfo + +func (m *Link) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Link) GetURL() string { + if m != nil { + return m.URL + } + return "" +} + +type Friend struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + LogoURL string `protobuf:"bytes,4,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"` + Links []*Link `protobuf:"bytes,5,rep,name=links" json:"links,omitempty"` + ImageURL string `protobuf:"bytes,6,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` +} + +func (m *Friend) Reset() { *m = Friend{} } +func (m *Friend) String() string { return proto.CompactTextString(m) } +func (*Friend) ProtoMessage() {} +func (*Friend) Descriptor() ([]byte, []int) { + return fileDescriptor_crew_26e212dfbbdddd43, []int{4} +} +func (m *Friend) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Friend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Friend.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Friend) XXX_Merge(src proto.Message) { + xxx_messageInfo_Friend.Merge(dst, src) +} +func (m *Friend) XXX_Size() int { + return m.Size() +} +func (m *Friend) XXX_DiscardUnknown() { + xxx_messageInfo_Friend.DiscardUnknown(m) +} + +var xxx_messageInfo_Friend proto.InternalMessageInfo + +func (m *Friend) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Friend) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Friend) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Friend) GetLogoURL() string { + if m != nil { + return m.LogoURL + } + return "" +} + +func (m *Friend) GetLinks() []*Link { + if m != nil { + return m.Links + } + return nil +} + +func (m *Friend) GetImageURL() string { + if m != nil { + return m.ImageURL + } + return "" +} + +func init() { + proto.RegisterType((*Crew)(nil), "calcbiz.crew.Crew") + proto.RegisterType((*Person)(nil), "calcbiz.crew.Person") + proto.RegisterType((*WebAccount)(nil), "calcbiz.crew.WebAccount") + proto.RegisterType((*Link)(nil), "calcbiz.crew.Link") + proto.RegisterType((*Friend)(nil), "calcbiz.crew.Friend") +} +func (m *Crew) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Crew) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Website) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Website))) + i += copy(dAtA[i:], m.Website) + } + if len(m.Members) > 0 { + for _, msg := range m.Members { + dAtA[i] = 0x1a + i++ + i = encodeVarintCrew(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Accounts) > 0 { + for _, msg := range m.Accounts { + dAtA[i] = 0x22 + i++ + i = encodeVarintCrew(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Friends) > 0 { + for _, msg := range m.Friends { + dAtA[i] = 0x2a + i++ + i = encodeVarintCrew(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Person) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Person) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Name) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + return i, nil +} + +func (m *WebAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WebAccount) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Provider) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Provider))) + i += copy(dAtA[i:], m.Provider) + } + if len(m.Handle) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Handle))) + i += copy(dAtA[i:], m.Handle) + } + if len(m.URL) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.URL))) + i += copy(dAtA[i:], m.URL) + } + return i, nil +} + +func (m *Link) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Link) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.URL) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.URL))) + i += copy(dAtA[i:], m.URL) + } + return i, nil +} + +func (m *Friend) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Friend) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Name) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Description) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.Description))) + i += copy(dAtA[i:], m.Description) + } + if len(m.LogoURL) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.LogoURL))) + i += copy(dAtA[i:], m.LogoURL) + } + if len(m.Links) > 0 { + for _, msg := range m.Links { + dAtA[i] = 0x2a + i++ + i = encodeVarintCrew(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.ImageURL) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintCrew(dAtA, i, uint64(len(m.ImageURL))) + i += copy(dAtA[i:], m.ImageURL) + } + return i, nil +} + +func encodeVarintCrew(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Crew) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovCrew(uint64(l)) + } + } + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovCrew(uint64(l)) + } + } + if len(m.Friends) > 0 { + for _, e := range m.Friends { + l = e.Size() + n += 1 + l + sovCrew(uint64(l)) + } + } + return n +} + +func (m *Person) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + return n +} + +func (m *WebAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + l = len(m.Handle) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + l = len(m.URL) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + return n +} + +func (m *Link) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + l = len(m.URL) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + return n +} + +func (m *Friend) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + l = len(m.LogoURL) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + if len(m.Links) > 0 { + for _, e := range m.Links { + l = e.Size() + n += 1 + l + sovCrew(uint64(l)) + } + } + l = len(m.ImageURL) + if l > 0 { + n += 1 + l + sovCrew(uint64(l)) + } + return n +} + +func sovCrew(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCrew(x uint64) (n int) { + return sovCrew(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Crew) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Crew: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Crew: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &Person{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accounts = append(m.Accounts, &WebAccount{}) + if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Friends", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Friends = append(m.Friends, &Friend{}) + if err := m.Friends[len(m.Friends)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCrew(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCrew + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Person) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Person: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Person: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCrew(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCrew + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WebAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WebAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WebAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Handle = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URL = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCrew(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCrew + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Link) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Link: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URL = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCrew(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCrew + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Friend) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Friend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Friend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogoURL", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogoURL = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Links = append(m.Links, &Link{}) + if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageURL", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrew + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrew + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageURL = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCrew(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCrew + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCrew(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCrew + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCrew + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCrew + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthCrew + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCrew + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipCrew(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthCrew = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCrew = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("pkg/crew/crew.proto", fileDescriptor_crew_26e212dfbbdddd43) } + +var fileDescriptor_crew_26e212dfbbdddd43 = []byte{ + // 457 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0x6e, 0x9a, 0x6e, 0x92, 0x7d, 0xdd, 0x83, 0x8c, 0x22, 0xd9, 0x22, 0x69, 0xe9, 0x41, 0xea, + 0xc1, 0x04, 0x5c, 0xfd, 0x01, 0xae, 0x20, 0x08, 0x3d, 0x48, 0xa0, 0x08, 0x5e, 0x24, 0x49, 0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0xfe, 0x36, 0x81, 0xf5, 0x63, + 0x1f, 0x0c, 0xee, 0xf6, 0xc1, 0xe0, 0xcf, 0x3e, 0x18, 0x7c, 0xbe, 0xac, 0x79, 0xa5, 0x30, 0xcc, + 0x31, 0xea, 0x7c, 0xa2, 0xfe, 0x6f, 0x48, 0x1d, 0xf3, 0x5c, 0xaf, 0xfe, 0x05, 0x00, 0x00, 0xff, + 0xff, 0x87, 0xcc, 0x09, 0x0f, 0x20, 0x03, 0x00, 0x00, +} diff --git a/pkg/crew/crew.proto b/pkg/crew/crew.proto new file mode 100644 index 00000000..60d95203 --- /dev/null +++ b/pkg/crew/crew.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; + +package calcbiz.crew; + +import "google/api/annotations.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +//import "google/protobuf/timestamp.proto"; + +option go_package = "ultre.me/calcbiz/pkg/crew"; +option (gogoproto.sizer_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; + +message Crew { + string name = 1; + string website = 2; + repeated Person members = 3; + repeated WebAccount accounts = 4; + repeated Friend friends = 5; +} + +message Person { + string key = 1; + string name = 2; +} + +message WebAccount { + string key = 1; + string provider = 2; + string handle = 3; + string url = 4 [(gogoproto.customname) = "URL"]; +} + +message Link { + string name = 1; + string url = 2 [(gogoproto.customname) = "URL"]; +} + +message Friend { + string key = 1; + string name = 2; + string description = 3; + string logo_url = 4 [(gogoproto.customname) = "LogoURL"]; + repeated Link links = 5; + string image_url = 6 [(gogoproto.customname) = "ImageURL"]; +} diff --git a/svc/svc.go b/svc/svc.go index 7cfd9d9b..37e738e5 100644 --- a/svc/svc.go +++ b/svc/svc.go @@ -5,6 +5,7 @@ import ( "fmt" "ultre.me/calcbiz/api" + "ultre.me/calcbiz/pkg/crew" "ultre.me/kryptos" ) @@ -45,8 +46,8 @@ func (svc *svc) Dashboard(_ context.Context, input *api.Void) (*api.DashboardOut return nil, fmt.Errorf("not implemented") } -func (svc *svc) Crew(_ context.Context, input *api.Void) (*api.CrewOutput, error) { - return nil, fmt.Errorf("not implemented") +func (svc *svc) Crew(_ context.Context, input *api.Void) (*crew.Crew, error) { + return &crew.CALC, nil } func (svc *svc) Numberinfo(_ context.Context, input *api.NumberinfoInput) (*api.NumberinfoOutput, error) {