Fix field name casing
This commit is contained in:
parent
fa5928e405
commit
019f237be1
4 changed files with 7 additions and 7 deletions
|
@ -27,7 +27,7 @@ type BrowserDetails struct {
|
||||||
|
|
||||||
UserAgent string `protobuf:"bytes,1,opt,name=userAgent,proto3" json:"userAgent,omitempty"`
|
UserAgent string `protobuf:"bytes,1,opt,name=userAgent,proto3" json:"userAgent,omitempty"`
|
||||||
BrowserType BrowserTypes `protobuf:"varint,2,opt,name=browserType,proto3,enum=client.BrowserTypes" json:"browserType,omitempty"`
|
BrowserType BrowserTypes `protobuf:"varint,2,opt,name=browserType,proto3,enum=client.BrowserTypes" json:"browserType,omitempty"`
|
||||||
Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"`
|
OS string `protobuf:"bytes,3,opt,name=OS,proto3" json:"OS,omitempty"`
|
||||||
SomeBool bool `protobuf:"varint,6,opt,name=someBool,proto3" json:"someBool,omitempty"`
|
SomeBool bool `protobuf:"varint,6,opt,name=someBool,proto3" json:"someBool,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,9 +77,9 @@ func (x *BrowserDetails) GetBrowserType() BrowserTypes {
|
||||||
return BrowserTypes_UNKNOWN_BROWSER_TYPE
|
return BrowserTypes_UNKNOWN_BROWSER_TYPE
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BrowserDetails) GetOs() string {
|
func (x *BrowserDetails) GetOS() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Os
|
return x.OS
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
@ -658,7 +658,7 @@ var file_authentication_proto_rawDesc = []byte{
|
||||||
0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x63, 0x6c, 0x69,
|
0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x63, 0x6c, 0x69,
|
||||||
0x65, 0x6e, 0x74, 0x2e, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73,
|
0x65, 0x6e, 0x74, 0x2e, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73,
|
||||||
0x52, 0x0b, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a,
|
0x52, 0x0b, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a,
|
||||||
0x02, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x1a, 0x0a,
|
0x02, 0x4f, 0x53, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x4f, 0x53, 0x12, 0x1a, 0x0a,
|
||||||
0x08, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
|
0x08, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||||
0x08, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x22, 0x9c, 0x02, 0x0a, 0x17, 0x41, 0x75,
|
0x08, 0x73, 0x6f, 0x6d, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x22, 0x9c, 0x02, 0x0a, 0x17, 0x41, 0x75,
|
||||||
0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
|
0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
|
||||||
|
|
|
@ -9,7 +9,7 @@ import "client.proto";
|
||||||
message BrowserDetails {
|
message BrowserDetails {
|
||||||
string userAgent = 1;
|
string userAgent = 1;
|
||||||
client.BrowserTypes browserType = 2;
|
client.BrowserTypes browserType = 2;
|
||||||
string os = 3;
|
string OS = 3;
|
||||||
bool someBool = 6;
|
bool someBool = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,6 @@ var Network = "Bugle"
|
||||||
var BrowserDetailsMessage = &binary.BrowserDetails{
|
var BrowserDetailsMessage = &binary.BrowserDetails{
|
||||||
UserAgent: UserAgent,
|
UserAgent: UserAgent,
|
||||||
BrowserType: binary.BrowserTypes_OTHER,
|
BrowserType: binary.BrowserTypes_OTHER,
|
||||||
Os: "libgm",
|
OS: "libgm",
|
||||||
SomeBool: true,
|
SomeBool: true,
|
||||||
}
|
}
|
||||||
|
|
2
main.go
2
main.go
|
@ -67,7 +67,7 @@ func (br *GMBridge) Init() {
|
||||||
br.CommandProcessor = commands.NewProcessor(&br.Bridge)
|
br.CommandProcessor = commands.NewProcessor(&br.Bridge)
|
||||||
br.RegisterCommands()
|
br.RegisterCommands()
|
||||||
|
|
||||||
util.BrowserDetailsMessage.Os = br.Config.GoogleMessages.OS
|
util.BrowserDetailsMessage.OS = br.Config.GoogleMessages.OS
|
||||||
browserVal, ok := binary.BrowserTypes_value[br.Config.GoogleMessages.Browser]
|
browserVal, ok := binary.BrowserTypes_value[br.Config.GoogleMessages.Browser]
|
||||||
if !ok {
|
if !ok {
|
||||||
br.ZLog.Error().Str("browser_value", br.Config.GoogleMessages.Browser).Msg("Invalid browser value")
|
br.ZLog.Error().Str("browser_value", br.Config.GoogleMessages.Browser).Msg("Invalid browser value")
|
||||||
|
|
Loading…
Reference in a new issue