counter for how many times the user has opened the app

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-25 00:09:24 -07:00
parent 67b2b17fad
commit cf75b4fbe6
2 changed files with 29 additions and 20 deletions

View File

@ -29,6 +29,7 @@ type Config struct {
Debugtable bool `protobuf:"varint,6,opt,name=debugtable,proto3" json:"debugtable,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"`
Counter int32 `protobuf:"varint,9,opt,name=counter,proto3" json:"counter,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -115,6 +116,13 @@ func (m *Config) GetAccounts() []*Config_Account {
return nil
}
func (m *Config) GetCounter() int32 {
if m != nil {
return m.Counter
}
return 0
}
type Config_Account struct {
Nick string `protobuf:"bytes,1,opt,name=nick,proto3" json:"nick,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
@ -210,23 +218,24 @@ func init() {
func init() { proto.RegisterFile("config.proto", fileDescriptor_3eaf2c85e69e9ea4) }
var fileDescriptor_3eaf2c85e69e9ea4 = []byte{
// 288 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xbf, 0x4e, 0xc3, 0x30,
0x10, 0xc6, 0x95, 0xb6, 0x49, 0x93, 0x2b, 0x93, 0x85, 0x90, 0x55, 0x10, 0x8a, 0x98, 0x32, 0x65,
0x80, 0x81, 0x19, 0x21, 0x76, 0x64, 0xc4, 0x03, 0xe4, 0x8f, 0xe3, 0x58, 0x6d, 0xed, 0x28, 0x76,
0x94, 0x47, 0x63, 0xe0, 0xe5, 0x90, 0xcf, 0x75, 0x09, 0x6c, 0xf7, 0xfb, 0xee, 0x72, 0x97, 0x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 0xf8, 0x5f, 0x38, 0xce, 0xbe, 0x3e, 0x55, 0x52, 0x61,
0x37, 0xc1, 0xee, 0x42, 0x71, 0x7f, 0x37, 0xe8, 0xd1, 0xa2, 0xf5, 0x98, 0x61, 0x5d, 0x27, 0xf8,
0x9a, 0x4f, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x97, 0x86, 0x08, 0x1c, 0xdd, 0x01, 0x00, 0x00,
// 297 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x4b, 0x4e, 0xc3, 0x30,
0x10, 0x86, 0x95, 0xa6, 0x79, 0x4d, 0x59, 0x59, 0x08, 0x59, 0x05, 0xa1, 0x88, 0x55, 0x56, 0x59,
0xc0, 0x82, 0x35, 0x42, 0xec, 0x91, 0x11, 0x07, 0xc8, 0xc3, 0x49, 0xac, 0xb6, 0x76, 0x14, 0x3b,
0xca, 0xe1, 0x38, 0x05, 0x37, 0x42, 0x1e, 0xd7, 0x25, 0xb0, 0xfb, 0xbf, 0x19, 0x67, 0x34, 0xf3,
0x05, 0xae, 0x1a, 0x25, 0x3b, 0xd1, 0x97, 0xe3, 0xa4, 0x8c, 0x22, 0xbb, 0x45, 0x98, 0x77, 0x9b,
0xea, 0xb9, 0x7b, 0xf8, 0x0e, 0x21, 0x7e, 0xc5, 0x2e, 0x21, 0xb0, 0xfd, 0xfc, 0x78, 0x63, 0x34,
0xc8, 0x83, 0x22, 0x63, 0x98, 0xc9, 0x35, 0x44, 0x8b, 0x68, 0xcd, 0x40, 0x37, 0x79, 0x50, 0x44,
0xcc, 0x01, 0xb9, 0x81, 0x78, 0xe0, 0xa2, 0x1f, 0x0c, 0x0d, 0xb1, 0x7c, 0x26, 0xb2, 0x87, 0x74,
0x50, 0xda, 0xc8, 0xea, 0xc4, 0xe9, 0x16, 0xa7, 0x5c, 0x98, 0xdc, 0x41, 0xd6, 0xf2, 0x7a, 0xee,
0x7b, 0x21, 0x7b, 0x1a, 0xe5, 0x41, 0x91, 0xb2, 0xdf, 0x02, 0xb9, 0x07, 0x40, 0x30, 0x55, 0x7d,
0xe4, 0x34, 0xc6, 0xf6, 0xaa, 0x62, 0x27, 0x77, 0xe2, 0xc8, 0x71, 0x72, 0xe2, 0x26, 0x7b, 0x26,
0xcf, 0x90, 0x56, 0x4d, 0xa3, 0x66, 0x69, 0x34, 0x4d, 0xf3, 0xb0, 0xd8, 0x3d, 0xde, 0x96, 0xab,
0x13, 0x4b, 0x77, 0x5e, 0xf9, 0xe2, 0xde, 0xb0, 0xcb, 0x63, 0x42, 0x21, 0xc1, 0xc4, 0x27, 0x9a,
0xe1, 0x1d, 0x1e, 0xf7, 0x5f, 0x01, 0x24, 0xe7, 0xf7, 0x56, 0x8b, 0x14, 0xcd, 0xc1, 0x6b, 0xb1,
0xd9, 0xae, 0x33, 0x6b, 0x3e, 0xe1, 0x3a, 0x1b, 0xb7, 0x8e, 0x67, 0xab, 0xcc, 0xa8, 0x03, 0x97,
0xe8, 0x26, 0x63, 0x0e, 0xec, 0x17, 0x63, 0xa5, 0xf5, 0xa2, 0xa6, 0xd6, 0xab, 0xf1, 0xfc, 0x47,
0x5b, 0xf4, 0x4f, 0x9b, 0x15, 0xa3, 0x4e, 0x95, 0x90, 0xd8, 0x8d, 0xb1, 0xbb, 0xaa, 0xd8, 0xed,
0x46, 0x35, 0x19, 0x94, 0x12, 0x31, 0xcc, 0x75, 0x8c, 0xff, 0xf9, 0xe9, 0x27, 0x00, 0x00, 0xff,
0xff, 0x15, 0x4b, 0x72, 0x6e, 0xf7, 0x01, 0x00, 0x00,
}

View File

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