store where the config file is

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-24 18:31:05 -07:00
parent 1361d866e3
commit 249bbb0e7a
2 changed files with 30 additions and 21 deletions

View File

@ -27,7 +27,8 @@ type Config struct {
Hostname string `protobuf:"bytes,4,opt,name=hostname,proto3" json:"hostname,omitempty"` Hostname string `protobuf:"bytes,4,opt,name=hostname,proto3" json:"hostname,omitempty"`
Debugging bool `protobuf:"varint,5,opt,name=debugging,proto3" json:"debugging,omitempty"` Debugging bool `protobuf:"varint,5,opt,name=debugging,proto3" json:"debugging,omitempty"`
Debugtable bool `protobuf:"varint,6,opt,name=debugtable,proto3" json:"debugtable,omitempty"` Debugtable bool `protobuf:"varint,6,opt,name=debugtable,proto3" json:"debugtable,omitempty"`
Accounts []*Config_Account `protobuf:"bytes,7,rep,name=accounts,proto3" json:"accounts,omitempty"` Filename string `protobuf:"bytes,7,opt,name=filename,proto3" json:"filename,omitempty"`
Accounts []*Config_Account `protobuf:"bytes,8,rep,name=accounts,proto3" json:"accounts,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
@ -100,6 +101,13 @@ func (m *Config) GetDebugtable() bool {
return false return false
} }
func (m *Config) GetFilename() string {
if m != nil {
return m.Filename
}
return ""
}
func (m *Config) GetAccounts() []*Config_Account { func (m *Config) GetAccounts() []*Config_Account {
if m != nil { if m != nil {
return m.Accounts return m.Accounts
@ -202,23 +210,23 @@ func init() {
func init() { proto.RegisterFile("config.proto", fileDescriptor_3eaf2c85e69e9ea4) } func init() { proto.RegisterFile("config.proto", fileDescriptor_3eaf2c85e69e9ea4) }
var fileDescriptor_3eaf2c85e69e9ea4 = []byte{ var fileDescriptor_3eaf2c85e69e9ea4 = []byte{
// 279 bytes of a gzipped FileDescriptorProto // 288 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xcf, 0x4e, 0xb4, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xbf, 0x4e, 0xc3, 0x30,
0x14, 0xc5, 0xc3, 0x30, 0xfc, 0xbb, 0xf3, 0xad, 0x9a, 0x2f, 0xa6, 0x19, 0x8d, 0x21, 0xae, 0x58, 0x10, 0xc6, 0x95, 0xb6, 0x49, 0x93, 0x2b, 0x93, 0x85, 0x90, 0x55, 0x10, 0x8a, 0x98, 0x32, 0x65,
0xb1, 0xd0, 0x85, 0x6b, 0x63, 0xdc, 0x9b, 0x1a, 0x1f, 0xa0, 0x40, 0xa7, 0x34, 0xe3, 0xb4, 0x84, 0x80, 0x81, 0x19, 0x21, 0x76, 0x64, 0xc4, 0x03, 0xe4, 0x8f, 0xe3, 0x58, 0x6d, 0xed, 0x28, 0x76,
0x96, 0xf0, 0x30, 0x3e, 0x8a, 0x2f, 0x67, 0x7a, 0x3b, 0x8c, 0xe8, 0xee, 0x9e, 0x73, 0x2e, 0xe4, 0x94, 0x47, 0x63, 0xe0, 0xe5, 0x90, 0xcf, 0x75, 0x09, 0x6c, 0xf7, 0xfb, 0xee, 0x72, 0x97, 0xef,
0xfc, 0x6e, 0xe1, 0x5f, 0x6b, 0xf4, 0x41, 0xc9, 0x7a, 0x18, 0x8d, 0x33, 0x64, 0x37, 0x2b, 0xf7, 0x33, 0x5c, 0x35, 0x5a, 0x75, 0x52, 0x94, 0xc3, 0xa8, 0xad, 0x26, 0xbb, 0x59, 0xda, 0x77, 0x57,
0xea, 0xa7, 0x66, 0x3a, 0xdc, 0x7d, 0xc6, 0x90, 0x3e, 0x63, 0x4a, 0x08, 0x6c, 0xdf, 0xdf, 0x5e, 0xd5, 0x53, 0xf7, 0xf0, 0xb5, 0x86, 0x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4f, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x97, 0x86, 0x08, 0x1c, 0xdd, 0x01, 0x00, 0x00,
} }

View File

@ -8,8 +8,9 @@ message Config {
string hostname = 4; string hostname = 4;
bool debugging = 5; bool debugging = 5;
bool debugtable = 6; bool debugtable = 6;
string filename = 7;
repeated Account accounts = 7; repeated Account accounts = 8;
message Account { message Account {
string nick = 1; string nick = 1;