diff --git a/api/api.pb.go b/api/api.pb.go index b197fecd..41b4318f 100644 --- a/api/api.pb.go +++ b/api/api.pb.go @@ -16,6 +16,8 @@ import ( grpc "google.golang.org/grpc" ) +import encoding_binary "encoding/binary" + import io "io" // Reference imports to suppress errors if they are not otherwise used. @@ -36,7 +38,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_1182541e4358e084, []int{0} + return fileDescriptor_api_08a853a0061745aa, []int{0} } func (m *Void) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,7 +75,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_1182541e4358e084, []int{1} + return fileDescriptor_api_08a853a0061745aa, []int{1} } func (m *Pong) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -117,7 +119,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_1182541e4358e084, []int{2} + return fileDescriptor_api_08a853a0061745aa, []int{2} } func (m *KryptosInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +163,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_1182541e4358e084, []int{3} + return fileDescriptor_api_08a853a0061745aa, []int{3} } func (m *KryptosOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -198,14 +200,14 @@ func (m *KryptosOutput) GetTo() string { } type TpyoEnocdeIpunt struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Form string `protobuf:"bytes,1,opt,name=form,proto3" json:"form,omitempty"` } 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_1182541e4358e084, []int{4} + return fileDescriptor_api_08a853a0061745aa, []int{4} } func (m *TpyoEnocdeIpunt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -234,9 +236,9 @@ func (m *TpyoEnocdeIpunt) XXX_DiscardUnknown() { var xxx_messageInfo_TpyoEnocdeIpunt proto.InternalMessageInfo -func (m *TpyoEnocdeIpunt) GetFrom() string { +func (m *TpyoEnocdeIpunt) GetForm() string { if m != nil { - return m.From + return m.Form } return "" } @@ -249,7 +251,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_1182541e4358e084, []int{5} + return fileDescriptor_api_08a853a0061745aa, []int{5} } func (m *TpyoEnocdeOuptut) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -292,7 +294,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_1182541e4358e084, []int{6} + return fileDescriptor_api_08a853a0061745aa, []int{6} } func (m *DahsboardRandomOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -322,14 +324,14 @@ func (m *DahsboardRandomOutput) XXX_DiscardUnknown() { var xxx_messageInfo_DahsboardRandomOutput proto.InternalMessageInfo type NumberinfoInput struct { - Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` + Number float32 `protobuf:"fixed32,1,opt,name=number,proto3" json:"number,omitempty"` } 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_1182541e4358e084, []int{7} + return fileDescriptor_api_08a853a0061745aa, []int{7} } func (m *NumberinfoInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,21 +360,22 @@ func (m *NumberinfoInput) XXX_DiscardUnknown() { var xxx_messageInfo_NumberinfoInput proto.InternalMessageInfo -func (m *NumberinfoInput) GetNumber() string { +func (m *NumberinfoInput) GetNumber() float32 { if m != nil { return m.Number } - return "" + return 0 } type NumberinfoOutput struct { + Facts map[string]string `protobuf:"bytes,1,rep,name=facts" json:"facts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } 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_1182541e4358e084, []int{8} + return fileDescriptor_api_08a853a0061745aa, []int{8} } func (m *NumberinfoOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -401,6 +404,13 @@ func (m *NumberinfoOutput) XXX_DiscardUnknown() { var xxx_messageInfo_NumberinfoOutput proto.InternalMessageInfo +func (m *NumberinfoOutput) GetFacts() map[string]string { + if m != nil { + return m.Facts + } + return nil +} + type MoijaimeOutput struct { Kiffs []string `protobuf:"bytes,1,rep,name=kiffs" json:"kiffs,omitempty"` } @@ -409,7 +419,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_1182541e4358e084, []int{9} + return fileDescriptor_api_08a853a0061745aa, []int{9} } func (m *MoijaimeOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -453,7 +463,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_1182541e4358e084, []int{10} + return fileDescriptor_api_08a853a0061745aa, []int{10} } func (m *WotdOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +507,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_1182541e4358e084, []int{11} + return fileDescriptor_api_08a853a0061745aa, []int{11} } func (m *AlternateLogoOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -540,7 +550,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_1182541e4358e084, []int{12} + return fileDescriptor_api_08a853a0061745aa, []int{12} } func (m *DahsboardOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -577,7 +587,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_1182541e4358e084, []int{13} + return fileDescriptor_api_08a853a0061745aa, []int{13} } func (m *RecettatorInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -620,7 +630,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_1182541e4358e084, []int{14} + return fileDescriptor_api_08a853a0061745aa, []int{14} } func (m *RecettatorOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -656,7 +666,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_1182541e4358e084, []int{15} + return fileDescriptor_api_08a853a0061745aa, []int{15} } func (m *DashboardOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -692,7 +702,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_1182541e4358e084, []int{16} + return fileDescriptor_api_08a853a0061745aa, []int{16} } func (m *SpreadshirtRandomOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -728,7 +738,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_1182541e4358e084, []int{17} + return fileDescriptor_api_08a853a0061745aa, []int{17} } func (m *SpreadshirtAllOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -764,7 +774,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_1182541e4358e084, []int{18} + return fileDescriptor_api_08a853a0061745aa, []int{18} } func (m *SoundcloudPlaylistsOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -800,7 +810,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_1182541e4358e084, []int{19} + return fileDescriptor_api_08a853a0061745aa, []int{19} } func (m *SoundcloudPlaylistOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -836,7 +846,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_1182541e4358e084, []int{20} + return fileDescriptor_api_08a853a0061745aa, []int{20} } func (m *SoundcloudTracksOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -872,7 +882,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_1182541e4358e084, []int{21} + return fileDescriptor_api_08a853a0061745aa, []int{21} } func (m *SoundcloudTrackOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -909,7 +919,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_1182541e4358e084, []int{22} + return fileDescriptor_api_08a853a0061745aa, []int{22} } func (m *SoundcloudPlaylistInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -953,7 +963,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_1182541e4358e084, []int{23} + return fileDescriptor_api_08a853a0061745aa, []int{23} } func (m *SoundcloudTrackInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -999,6 +1009,7 @@ func init() { proto.RegisterType((*DahsboardRandomOutput)(nil), "calcbiz.server.DahsboardRandomOutput") proto.RegisterType((*NumberinfoInput)(nil), "calcbiz.server.NumberinfoInput") proto.RegisterType((*NumberinfoOutput)(nil), "calcbiz.server.NumberinfoOutput") + proto.RegisterMapType((map[string]string)(nil), "calcbiz.server.NumberinfoOutput.FactsEntry") proto.RegisterType((*MoijaimeOutput)(nil), "calcbiz.server.MoijaimeOutput") proto.RegisterType((*WotdOutput)(nil), "calcbiz.server.WotdOutput") proto.RegisterType((*AlternateLogoOutput)(nil), "calcbiz.server.AlternateLogoOutput") @@ -1754,11 +1765,11 @@ func (m *TpyoEnocdeIpunt) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.From) > 0 { + if len(m.Form) > 0 { dAtA[i] = 0xa i++ - i = encodeVarintApi(dAtA, i, uint64(len(m.From))) - i += copy(dAtA[i:], m.From) + i = encodeVarintApi(dAtA, i, uint64(len(m.Form))) + i += copy(dAtA[i:], m.Form) } return i, nil } @@ -1820,11 +1831,11 @@ func (m *NumberinfoInput) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Number) > 0 { - dAtA[i] = 0xa + if m.Number != 0 { + dAtA[i] = 0xd i++ - i = encodeVarintApi(dAtA, i, uint64(len(m.Number))) - i += copy(dAtA[i:], m.Number) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Number)))) + i += 4 } return i, nil } @@ -1844,6 +1855,23 @@ func (m *NumberinfoOutput) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Facts) > 0 { + for k, _ := range m.Facts { + dAtA[i] = 0xa + i++ + v := m.Facts[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } return i, nil } @@ -2222,7 +2250,7 @@ func (m *TpyoEnocdeIpunt) Size() (n int) { } var l int _ = l - l = len(m.From) + l = len(m.Form) if l > 0 { n += 1 + l + sovApi(uint64(l)) } @@ -2257,9 +2285,8 @@ func (m *NumberinfoInput) Size() (n int) { } var l int _ = l - l = len(m.Number) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + if m.Number != 0 { + n += 5 } return n } @@ -2270,6 +2297,14 @@ func (m *NumberinfoOutput) Size() (n int) { } var l int _ = l + if len(m.Facts) > 0 { + for k, v := range m.Facts { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } return n } @@ -2762,7 +2797,7 @@ func (m *TpyoEnocdeIpunt) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Form", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2787,7 +2822,7 @@ func (m *TpyoEnocdeIpunt) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.From = string(dAtA[iNdEx:postIndex]) + m.Form = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2969,34 +3004,16 @@ func (m *NumberinfoInput) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { + if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - 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 ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex > l { + var v uint32 + if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } - m.Number = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Number = float32(math.Float32frombits(v)) default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -3047,6 +3064,124 @@ func (m *NumberinfoOutput) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: NumberinfoOutput: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Facts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Facts == nil { + m.Facts = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Facts[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -4067,71 +4202,76 @@ var ( ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("api/api.proto", fileDescriptor_api_1182541e4358e084) } - -var fileDescriptor_api_1182541e4358e084 = []byte{ - // 1004 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0xdb, 0xb6, - 0x17, 0x8f, 0x53, 0x7f, 0xf3, 0x6d, 0x5e, 0x1b, 0x3b, 0x61, 0x1c, 0xff, 0x50, 0x52, 0xdb, 0x65, - 0xdb, 0xb5, 0x19, 0x50, 0x0b, 0xdb, 0x6e, 0xbd, 0x75, 0x6d, 0x0e, 0x41, 0xd7, 0x35, 0x70, 0xba, - 0x15, 0xc8, 0x65, 0x90, 0x2d, 0x5a, 0x56, 0x23, 0x89, 0x1a, 0x45, 0x2d, 0xc8, 0x02, 0x5f, 0x76, - 0xde, 0x61, 0xc0, 0xfe, 0xa9, 0x1d, 0x0b, 0x0c, 0x03, 0x76, 0x1c, 0x92, 0xfd, 0x21, 0x03, 0x29, - 0x5a, 0xb4, 0x29, 0xab, 0x3b, 0xed, 0x62, 0x90, 0xef, 0x7d, 0xf8, 0xf9, 0xf0, 0xd1, 0xef, 0x87, - 0x60, 0xcb, 0x89, 0x7d, 0xdb, 0x89, 0xfd, 0x41, 0xcc, 0x28, 0xa7, 0xa8, 0x36, 0x76, 0x82, 0xf1, - 0xc8, 0xff, 0x71, 0x90, 0x10, 0xf6, 0x03, 0x61, 0xd6, 0x81, 0x47, 0xa9, 0x17, 0x10, 0x5b, 0xa2, - 0xa2, 0x88, 0x72, 0x87, 0xfb, 0x34, 0x4a, 0x32, 0xb4, 0xf5, 0xd4, 0xf3, 0xf9, 0x34, 0x1d, 0x0d, - 0xc6, 0x34, 0xb4, 0x3d, 0xea, 0x51, 0x5b, 0x9a, 0x47, 0xe9, 0x44, 0xee, 0xe4, 0x46, 0xae, 0x14, - 0x7c, 0x37, 0x3e, 0xf7, 0xec, 0x31, 0x23, 0x17, 0xf2, 0x47, 0x19, 0x7b, 0xc2, 0x98, 0xd0, 0x34, - 0x72, 0xc7, 0x01, 0x4d, 0xdd, 0x85, 0x65, 0x06, 0xc0, 0x1b, 0x50, 0xfd, 0x96, 0xfa, 0x2e, 0xb6, - 0xa0, 0x7a, 0x42, 0x23, 0x0f, 0x21, 0xa8, 0xc6, 0x34, 0xf2, 0xda, 0x95, 0x7e, 0xe5, 0xc9, 0xe6, - 0x50, 0xae, 0x31, 0x86, 0xbb, 0xaf, 0xd8, 0x65, 0xcc, 0x69, 0x72, 0x1c, 0xc5, 0x29, 0x17, 0x98, - 0x09, 0xa3, 0xe1, 0x1c, 0x23, 0xd6, 0xb8, 0x07, 0x5b, 0x0a, 0xf3, 0x26, 0xe5, 0x02, 0x54, 0x83, - 0x75, 0x4e, 0x15, 0x64, 0x9d, 0x53, 0xfc, 0x08, 0xea, 0x6f, 0xe3, 0x4b, 0x7a, 0x14, 0xd1, 0xb1, - 0x4b, 0x8e, 0xe3, 0x34, 0x5a, 0xcd, 0x83, 0x61, 0x5b, 0xc3, 0xde, 0xa4, 0x31, 0x5f, 0x41, 0xd5, - 0x82, 0xbd, 0x97, 0xce, 0x34, 0x19, 0x51, 0x87, 0xb9, 0x43, 0x27, 0x72, 0x69, 0x98, 0x69, 0xe2, - 0x43, 0xa8, 0x7f, 0x9d, 0x86, 0x23, 0xc2, 0xfc, 0x68, 0x42, 0xb3, 0xbb, 0x36, 0x61, 0x23, 0x92, - 0x26, 0x75, 0x5e, 0xed, 0x30, 0x82, 0x6d, 0x0d, 0x55, 0xc7, 0x3f,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0x6e, 0xfb, 0x2a, 0x5b, 0xcf, 0x10, - 0x05, 0xd0, 0xc5, 0x5e, 0x94, 0x34, 0xfa, 0x45, 0x51, 0xb2, 0xd0, 0x29, 0xba, 0x52, 0xb2, 0x8d, - 0x9a, 0x52, 0x92, 0xe5, 0x6e, 0xfb, 0x4a, 0x34, 0x97, 0x19, 0x7a, 0x07, 0xb7, 0xe7, 0xcd, 0xb0, - 0xe4, 0xb1, 0xba, 0xa6, 0x75, 0xb9, 0x79, 0xe2, 0x3d, 0xa9, 0x50, 0x47, 0x5b, 0x52, 0x21, 0x9c, - 0x93, 0x25, 0xb0, 0x53, 0xe8, 0x47, 0x25, 0x0a, 0x8f, 0x4d, 0x6b, 0x59, 0x23, 0x53, 0x99, 0x89, - 0x5a, 0x85, 0xcc, 0x64, 0x19, 0xff, 0x7b, 0xa8, 0x2d, 0x77, 0xba, 0x12, 0xc5, 0x87, 0x1f, 0x51, - 0xd4, 0xfd, 0xf1, 0x40, 0xca, 0x35, 0xd1, 0xca, 0x42, 0x40, 0xaf, 0xa0, 0x2a, 0xc6, 0x43, 0x89, - 0x82, 0x65, 0x5a, 0xf5, 0x28, 0x31, 0x52, 0xed, 0x42, 0x90, 0x78, 0xb0, 0xb5, 0x34, 0x49, 0x4a, - 0x58, 0x1f, 0x98, 0xd6, 0x15, 0xe3, 0x07, 0xef, 0x4b, 0xfa, 0x3d, 0xb4, 0x9b, 0x7d, 0x70, 0xcc, - 0x11, 0x4f, 0x03, 0xc1, 0x7b, 0x06, 0x77, 0x75, 0x2f, 0x7d, 0x5d, 0xf6, 0x9f, 0xb7, 0xb5, 0x55, - 0x7f, 0x49, 0x7c, 0x93, 0x10, 0x86, 0x2d, 0x49, 0xde, 0x40, 0x28, 0x7b, 0x13, 0xfd, 0xc9, 0x11, - 0x12, 0x14, 0xc2, 0xee, 0x8a, 0x79, 0x52, 0x22, 0x71, 0x6f, 0x95, 0x44, 0x7e, 0x08, 0xdf, 0x97, - 0x3a, 0xfb, 0xa8, 0x63, 0xea, 0xc4, 0x39, 0xef, 0xcf, 0x15, 0x40, 0x45, 0x3d, 0x54, 0xcc, 0xa6, - 0xd5, 0x73, 0xc7, 0x3a, 0xf8, 0xd8, 0x0d, 0xb0, 0x2d, 0x2f, 0x70, 0x88, 0x1e, 0x97, 0x5e, 0xc0, - 0xbe, 0x5a, 0x18, 0x5b, 0x33, 0xe4, 0xc2, 0xb6, 0x39, 0x14, 0xff, 0x3d, 0x37, 0xb4, 0x70, 0x76, - 0xc2, 0xa8, 0xd7, 0x05, 0x59, 0x9e, 0x31, 0xce, 0xa0, 0x6e, 0xa8, 0xa0, 0x87, 0xe5, 0x01, 0xeb, - 0x61, 0x69, 0x75, 0x4a, 0x45, 0xf1, 0xa1, 0xd4, 0x7c, 0x80, 0xee, 0xaf, 0xd6, 0xb4, 0xaf, 0xe6, - 0x53, 0x76, 0xf6, 0xe5, 0xe0, 0xb7, 0xeb, 0x6e, 0xe5, 0xc3, 0x75, 0xb7, 0xf2, 0xd7, 0x75, 0xb7, - 0xf2, 0xcb, 0x4d, 0x77, 0xed, 0xc3, 0x4d, 0x77, 0xed, 0xcf, 0x9b, 0xee, 0xda, 0x59, 0x23, 0x0d, - 0x38, 0x23, 0x83, 0x90, 0xd8, 0x4a, 0x47, 0x90, 0x8d, 0x36, 0xe4, 0xe7, 0xe7, 0x17, 0xff, 0x04, - 0x00, 0x00, 0xff, 0xff, 0x00, 0xf0, 0x59, 0x5c, 0x22, 0x0b, 0x00, 0x00, +func init() { proto.RegisterFile("api/api.proto", fileDescriptor_api_08a853a0061745aa) } + +var fileDescriptor_api_08a853a0061745aa = []byte{ + // 1078 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0xdb, 0x36, + 0x14, 0x8e, 0x1d, 0x27, 0x6b, 0x5e, 0x1a, 0xdb, 0x61, 0x1c, 0xc7, 0x56, 0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, 0xea, 0x85, 0xe7, 0x25, 0x35, 0x93, 0xc8, 0x4b, 0xe6, 0xec, + 0xa1, 0x23, 0x24, 0x5b, 0xa8, 0x29, 0x24, 0x59, 0x96, 0x36, 0x2f, 0x13, 0x47, 0xb9, 0x42, 0x6f, + 0xe0, 0xd6, 0xc4, 0x01, 0x0b, 0x36, 0xab, 0xa3, 0x47, 0x67, 0x1d, 0x13, 0x6f, 0x0a, 0x85, 0x1a, + 0x5a, 0x13, 0x0a, 0xfe, 0x84, 0x2c, 0x82, 0xf5, 0x9c, 0x09, 0x15, 0x28, 0x3c, 0xd4, 0xa3, 0x45, + 0xee, 0x95, 0x3e, 0x00, 0xb4, 0x25, 0xa4, 0x22, 0x85, 0x32, 0x99, 0xe4, 0x7f, 0x0b, 0xd5, 0x59, + 0x7b, 0x2b, 0x50, 0xbc, 0xff, 0x01, 0x45, 0x65, 0x8a, 0x3b, 0x42, 0xae, 0x89, 0x1a, 0x39, 0x39, + 0xcb, 0xf3, 0xd0, 0x0b, 0xa8, 0x24, 0x3d, 0xa1, 0x40, 0xc1, 0xd0, 0xa3, 0xaa, 0x7f, 0x68, 0x57, + 0xed, 0x22, 0x21, 0x71, 0x60, 0x6d, 0xa6, 0x7d, 0x14, 0xb0, 0xde, 0xd3, 0xa3, 0x73, 0x7a, 0x0e, + 0xde, 0x16, 0xf4, 0x9b, 0x68, 0x43, 0xfe, 0xc7, 0x99, 0x20, 0x1e, 0x7b, 0x09, 0xef, 0x19, 0xdc, + 0x56, 0x06, 0xfa, 0xb2, 0xe8, 0xcc, 0x5b, 0x2a, 0xaa, 0xfe, 0xbc, 0x7c, 0x17, 0x11, 0x86, 0x0d, + 0x41, 0xde, 0x40, 0x48, 0xee, 0x89, 0xfa, 0x97, 0xe3, 0x13, 0xe4, 0xc3, 0xc6, 0x9c, 0x26, 0x52, + 0x20, 0x71, 0x67, 0x9e, 0x44, 0x56, 0x84, 0xef, 0x0a, 0x9d, 0x6d, 0xd4, 0xd6, 0x75, 0xc2, 0x8c, + 0xf7, 0x97, 0x12, 0xa0, 0xbc, 0x1e, 0xca, 0xdf, 0xa6, 0xf9, 0xcd, 0xc6, 0xd8, 0xf9, 0xd0, 0x0a, + 0xb0, 0x29, 0x16, 0xb0, 0x8f, 0x1e, 0x16, 0x2e, 0xc0, 0xbc, 0x9c, 0xea, 0x55, 0x57, 0xc8, 0x86, + 0xba, 0xde, 0x09, 0xff, 0xff, 0x6e, 0x28, 0x61, 0x59, 0xa1, 0xbd, 0xd7, 0x29, 0x59, 0x2e, 0x19, + 0xaf, 0xa0, 0xa6, 0xa9, 0xa0, 0xfb, 0xc5, 0x1f, 0xac, 0x3a, 0xa4, 0xd1, 0x2e, 0x14, 0xc5, 0xfb, + 0x42, 0xf3, 0x1e, 0xba, 0x3b, 0x5f, 0xd3, 0xbc, 0x9c, 0xb4, 0xd6, 0xab, 0xaf, 0xba, 0x7f, 0x5c, + 0x77, 0x4a, 0xef, 0xaf, 0x3b, 0xa5, 0x7f, 0xae, 0x3b, 0xa5, 0xdf, 0x6e, 0x3a, 0x0b, 0xef, 0x6f, + 0x3a, 0x0b, 0x7f, 0xdf, 0x74, 0x16, 0xce, 0x1a, 0xb1, 0xc7, 0x19, 0xe9, 0xfa, 0xc4, 0x4c, 0x75, + 0x12, 0xb2, 0xfe, 0xb2, 0xf8, 0xc7, 0xfb, 0xe5, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x13, 0x88, + 0xb6, 0x0c, 0x95, 0x0b, 0x00, 0x00, } diff --git a/api/api.pb.gw.go b/api/api.pb.gw.go index 3ebc82e8..b914a935 100644 --- a/api/api.pb.gw.go +++ b/api/api.pb.gw.go @@ -110,7 +110,7 @@ func request_Server_Numberinfo_0(ctx context.Context, marshaler runtime.Marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "number") } - protoReq.Number, err = runtime.String(val) + protoReq.Number, err = runtime.Float32(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "number", err) @@ -680,7 +680,7 @@ var ( pattern_Server_KryptosDecrypt_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "kryptos", "decrypt"}, "")) - pattern_Server_TpyoEnocde_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "spreadshirt", "all"}, "")) + pattern_Server_TpyoEnocde_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api", "tpyo"}, "")) pattern_Server_Ping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api", "ping"}, "")) diff --git a/api/api.proto b/api/api.proto index e9ad747c..775dd8db 100644 --- a/api/api.proto +++ b/api/api.proto @@ -28,7 +28,7 @@ service Server { }; rpc TpyoEnocde(TpyoEnocdeIpunt) returns (TpyoEnocdeOuptut) { option (google.api.http) = { - post: "/api/spreadshirt/all" + post: "/api/tpyo" body: "*" }; } @@ -62,11 +62,11 @@ message Void {} message Pong { string pong = 1; } message KryptosInput { string from = 1; } message KryptosOutput { string to = 1; } -message TpyoEnocdeIpunt { string from = 1; } +message TpyoEnocdeIpunt { string form = 1; } message TpyoEnocdeOuptut { string to = 1; } message DahsboardRandomOutput { /* TODO */ } -message NumberinfoInput { string number = 1; } -message NumberinfoOutput { /* TODO */ } +message NumberinfoInput { float number = 1; } +message NumberinfoOutput { map facts = 1; } message MoijaimeOutput { repeated string kiffs = 1; } message WotdOutput { string word = 1; } message AlternateLogoOutput { string path = 1; } diff --git a/go.mod b/go.mod index b238ce2d..5feeca28 100644 --- a/go.mod +++ b/go.mod @@ -16,12 +16,14 @@ require ( github.com/sirupsen/logrus v1.3.0 // indirect github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c // indirect + github.com/tpyolang/tpyo-cli v1.0.0 github.com/urfave/cli v1.20.0 github.com/yanatan16/golang-soundcloud v0.0.0-20161013200625-a182dd459b66 go.uber.org/atomic v1.3.2 // indirect go.uber.org/multierr v1.1.0 // indirect go.uber.org/zap v1.9.1 golang.org/x/net v0.0.0-20190110044637-be1c187aa6c6 + google.golang.org/appengine v1.2.0 // indirect google.golang.org/genproto v0.0.0-20190108161440-ae2f86662275 google.golang.org/grpc v1.17.0 ultre.me/kryptos v0.0.0-20181023194748-240fe1a16033 diff --git a/go.sum b/go.sum index 82b19828..90004b56 100644 --- a/go.sum +++ b/go.sum @@ -304,6 +304,8 @@ github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/tpyolang/tpyo-cli v1.0.0 h1:vf0ddfW9Si2pn3rzPe51hFpWmvkkVZNWnmXLIsAe2gg= +github.com/tpyolang/tpyo-cli v1.0.0/go.mod h1:gYyKr7Mog1FDfbA58jt3iYlcUZY5ztHkHjioIDLuu1w= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= diff --git a/pkg/crew/crew.go b/pkg/crew/crew.go index 243468d3..90be538b 100644 --- a/pkg/crew/crew.go +++ b/pkg/crew/crew.go @@ -1,4 +1,4 @@ -package crew +package crew // import "ultre.me/calcbiz/pkg/crew" var CALC = Crew{ Name: "Camembert au lait crew", diff --git a/pkg/dashboard/dashboard.go b/pkg/dashboard/dashboard.go index b9b3d5ff..7f361b9b 100644 --- a/pkg/dashboard/dashboard.go +++ b/pkg/dashboard/dashboard.go @@ -1,4 +1,4 @@ -package calcdashboard +package dashboard // import "ultre.me/calcbiz/pkg/dashboard" import ( "fmt" @@ -9,7 +9,7 @@ import ( ) type CALCDashboard struct { - soundcloud *calcsoundcloud.CALCSoundcloud + soundcloud *soundcloud.Soundcloud } const ( @@ -22,7 +22,7 @@ func New() *CALCDashboard { return &CALCDashboard{} } -func (d *CALCDashboard) SetSoundCloud(soundcloud *calcsoundcloud.CALCSoundcloud) { +func (d *CALCDashboard) SetSoundCloud(soundcloud *soundcloud.Soundcloud) { d.soundcloud = soundcloud } @@ -66,7 +66,7 @@ func (d *CALCDashboard) trackEntries(limit int) (Entries, error) { func (d *CALCDashboard) merchEntries(limit int) (Entries, error) { entries := Entries{} - products := calcspreadshirt.GetAllProducts(250, 250) + products := spreadshirt.GetAllProducts(250, 250) if len(products) < limit { limit = len(products) } diff --git a/pkg/numberinfo/numberinfo.go b/pkg/numberinfo/numberinfo.go index 8533852b..5b49cbc5 100644 --- a/pkg/numberinfo/numberinfo.go +++ b/pkg/numberinfo/numberinfo.go @@ -1,4 +1,4 @@ -package calcnumberinfo +package numberinfo // import "ultre.me/calcbiz/pkg/numberinfo" import ( "math" diff --git a/pkg/random/random.go b/pkg/random/random.go index 1531275b..076c5b5b 100644 --- a/pkg/random/random.go +++ b/pkg/random/random.go @@ -1,4 +1,4 @@ -package calcrand +package random // import "ultre.me/calcbiz/pkg/random" import ( "fmt" diff --git a/pkg/spreadshirt/spreadshirt.go b/pkg/spreadshirt/spreadshirt.go index 326eeb3c..e93bc561 100644 --- a/pkg/spreadshirt/spreadshirt.go +++ b/pkg/spreadshirt/spreadshirt.go @@ -1,4 +1,4 @@ -package calcspreadshirt +package spreadshirt // import "ultre.me/calcbiz/pkg/spreadshirt" import ( "fmt" diff --git a/svc/svc.go b/svc/svc.go index 35465dc4..3cfcf156 100644 --- a/svc/svc.go +++ b/svc/svc.go @@ -4,8 +4,11 @@ import ( "context" "fmt" + tpyo "github.com/tpyolang/tpyo-cli" "ultre.me/calcbiz/api" "ultre.me/calcbiz/pkg/crew" + "ultre.me/calcbiz/pkg/numberinfo" + "ultre.me/calcbiz/pkg/random" "ultre.me/calcbiz/pkg/soundcloud" "ultre.me/kryptos" ) @@ -49,24 +52,10 @@ func (svc *svc) KryptosDecrypt(_ context.Context, input *api.KryptosInput) (*api } func (svc *svc) TpyoEnocde(_ context.Context, input *api.TpyoEnocdeIpunt) (*api.TpyoEnocdeOuptut, error) { - /* - r.Post("/tpyo/enocde", func(w http.ResponseWriter, r *http.Request) { - var data struct { - Message string - } - if err := c.BindJSON(&data); err == nil { - enedocr := tpyo.NewTpyo() - c.JSON(http.StatusOK, gin.H{ - "result": enedocr.Enocde(data.Message), - }) - } else { - c.JSON(http.StatusNotFound, gin.H{ - "error": fmt.Sprintf("Invalid input: %v", err), - }) - } - }) - */ - return nil, fmt.Errorf("not implemented") + enedocr := tpyo.NewTpyo() + return &api.TpyoEnocdeOuptut{ + To: enedocr.Enocde(input.Form), + }, nil } func (svc *svc) Dashboard(_ context.Context, input *api.Void) (*api.DashboardOutput, error) { @@ -92,23 +81,12 @@ func (svc *svc) Crew(_ context.Context, input *api.Void) (*crew.Crew, error) { } func (svc *svc) Numberinfo(_ context.Context, input *api.NumberinfoInput) (*api.NumberinfoOutput, error) { - /* - r.Get("/numberinfo/all/:number", func(w http.ResponseWriter, r *http.Request) { - number, err := strconv.ParseFloat(c.Param("number"), 64) - if err != nil { - c.JSON(http.StatusNotFound, gin.H{ - "error": fmt.Sprintf("Invalid number: %v (%v)", c.Param("number"), err), - }) - return - } - - info := calcnumberinfo.New(number).All() - c.JSON(http.StatusOK, gin.H{ - "result": info, - }) - }) - */ - return nil, fmt.Errorf("not implemented") + // FIXME: validate: input.Number is mandatory + facts := map[string]string{} + for k, v := range numberinfo.New(float64(input.Number)).All() { + facts[k] = fmt.Sprintf("%v", v) + } + return &api.NumberinfoOutput{Facts: facts}, nil } func (svc *svc) Recettator(_ context.Context, input *api.RecettatorInput) (*api.RecettatorOutput, error) { @@ -177,25 +155,15 @@ func (svc *svc) SpreadshirtAll(_ context.Context, input *api.Void) (*api.Spreads } func (svc *svc) Wotd(_ context.Context, input *api.Void) (*api.WotdOutput, error) { - /* - r.Get("/random/wotd", func(w http.ResponseWriter, r *http.Request) { - c.JSON(http.StatusOK, gin.H{ - "result": calcrand.WOTD(), - }) - }) - */ - return nil, fmt.Errorf("not implemented") + return &api.WotdOutput{ + Word: random.WOTD(), + }, nil } func (svc *svc) AlternateLogo(_ context.Context, input *api.Void) (*api.AlternateLogoOutput, error) { - /* - r.Get("/random/alternate-logo", func(w http.ResponseWriter, r *http.Request) { - c.JSON(http.StatusOK, gin.H{ - "result": calcrand.AlternateLogo(), - }) - }) - */ - return nil, fmt.Errorf("not implemented") + return &api.AlternateLogoOutput{ + Path: random.AlternateLogo(), + }, nil } func (svc *svc) SoundcloudMe(_ context.Context, input *api.Void) (*soundcloud.User, error) {