github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/protocol/keybase1/common.go (about)

     1  // Auto-generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
     2  //   Input file: avdl/keybase1/common.avdl
     3  
     4  package keybase1
     5  
     6  import (
     7  	"errors"
     8  	"fmt"
     9  	"github.com/keybase/go-framed-msgpack-rpc/rpc"
    10  )
    11  
    12  type Time int64
    13  
    14  func (o Time) DeepCopy() Time {
    15  	return o
    16  }
    17  
    18  type UnixTime int64
    19  
    20  func (o UnixTime) DeepCopy() UnixTime {
    21  	return o
    22  }
    23  
    24  type DurationSec float64
    25  
    26  func (o DurationSec) DeepCopy() DurationSec {
    27  	return o
    28  }
    29  
    30  type DurationMsec float64
    31  
    32  func (o DurationMsec) DeepCopy() DurationMsec {
    33  	return o
    34  }
    35  
    36  type StringKVPair struct {
    37  	Key   string `codec:"key" json:"key"`
    38  	Value string `codec:"value" json:"value"`
    39  }
    40  
    41  func (o StringKVPair) DeepCopy() StringKVPair {
    42  	return StringKVPair{
    43  		Key:   o.Key,
    44  		Value: o.Value,
    45  	}
    46  }
    47  
    48  type Status struct {
    49  	Code   int            `codec:"code" json:"code"`
    50  	Name   string         `codec:"name" json:"name"`
    51  	Desc   string         `codec:"desc" json:"desc"`
    52  	Fields []StringKVPair `codec:"fields" json:"fields"`
    53  }
    54  
    55  func (o Status) DeepCopy() Status {
    56  	return Status{
    57  		Code: o.Code,
    58  		Name: o.Name,
    59  		Desc: o.Desc,
    60  		Fields: (func(x []StringKVPair) []StringKVPair {
    61  			if x == nil {
    62  				return nil
    63  			}
    64  			ret := make([]StringKVPair, len(x))
    65  			for i, v := range x {
    66  				vCopy := v.DeepCopy()
    67  				ret[i] = vCopy
    68  			}
    69  			return ret
    70  		})(o.Fields),
    71  	}
    72  }
    73  
    74  type UID string
    75  
    76  func (o UID) DeepCopy() UID {
    77  	return o
    78  }
    79  
    80  type VID string
    81  
    82  func (o VID) DeepCopy() VID {
    83  	return o
    84  }
    85  
    86  type DeviceID string
    87  
    88  func (o DeviceID) DeepCopy() DeviceID {
    89  	return o
    90  }
    91  
    92  type SigID string
    93  
    94  func (o SigID) DeepCopy() SigID {
    95  	return o
    96  }
    97  
    98  type LeaseID string
    99  
   100  func (o LeaseID) DeepCopy() LeaseID {
   101  	return o
   102  }
   103  
   104  type KID string
   105  
   106  func (o KID) DeepCopy() KID {
   107  	return o
   108  }
   109  
   110  type PhoneNumber string
   111  
   112  func (o PhoneNumber) DeepCopy() PhoneNumber {
   113  	return o
   114  }
   115  
   116  type RawPhoneNumber string
   117  
   118  func (o RawPhoneNumber) DeepCopy() RawPhoneNumber {
   119  	return o
   120  }
   121  
   122  type LinkID string
   123  
   124  func (o LinkID) DeepCopy() LinkID {
   125  	return o
   126  }
   127  
   128  type BinaryLinkID []byte
   129  
   130  func (o BinaryLinkID) DeepCopy() BinaryLinkID {
   131  	return (func(x []byte) []byte {
   132  		if x == nil {
   133  			return nil
   134  		}
   135  		return append([]byte{}, x...)
   136  	})(o)
   137  }
   138  
   139  type BinaryKID []byte
   140  
   141  func (o BinaryKID) DeepCopy() BinaryKID {
   142  	return (func(x []byte) []byte {
   143  		if x == nil {
   144  			return nil
   145  		}
   146  		return append([]byte{}, x...)
   147  	})(o)
   148  }
   149  
   150  type TLFID string
   151  
   152  func (o TLFID) DeepCopy() TLFID {
   153  	return o
   154  }
   155  
   156  type TeamID string
   157  
   158  func (o TeamID) DeepCopy() TeamID {
   159  	return o
   160  }
   161  
   162  type UserOrTeamID string
   163  
   164  func (o UserOrTeamID) DeepCopy() UserOrTeamID {
   165  	return o
   166  }
   167  
   168  type GitRepoName string
   169  
   170  func (o GitRepoName) DeepCopy() GitRepoName {
   171  	return o
   172  }
   173  
   174  type HashMeta []byte
   175  
   176  func (o HashMeta) DeepCopy() HashMeta {
   177  	return (func(x []byte) []byte {
   178  		if x == nil {
   179  			return nil
   180  		}
   181  		return append([]byte{}, x...)
   182  	})(o)
   183  }
   184  
   185  type UserVersion struct {
   186  	Uid         UID   `codec:"uid" json:"uid"`
   187  	EldestSeqno Seqno `codec:"eldestSeqno" json:"eldestSeqno"`
   188  }
   189  
   190  func (o UserVersion) DeepCopy() UserVersion {
   191  	return UserVersion{
   192  		Uid:         o.Uid.DeepCopy(),
   193  		EldestSeqno: o.EldestSeqno.DeepCopy(),
   194  	}
   195  }
   196  
   197  type TeamType int
   198  
   199  const (
   200  	TeamType_NONE   TeamType = 0
   201  	TeamType_LEGACY TeamType = 1
   202  	TeamType_MODERN TeamType = 2
   203  )
   204  
   205  func (o TeamType) DeepCopy() TeamType { return o }
   206  
   207  var TeamTypeMap = map[string]TeamType{
   208  	"NONE":   0,
   209  	"LEGACY": 1,
   210  	"MODERN": 2,
   211  }
   212  
   213  var TeamTypeRevMap = map[TeamType]string{
   214  	0: "NONE",
   215  	1: "LEGACY",
   216  	2: "MODERN",
   217  }
   218  
   219  func (e TeamType) String() string {
   220  	if v, ok := TeamTypeRevMap[e]; ok {
   221  		return v
   222  	}
   223  	return fmt.Sprintf("%v", int(e))
   224  }
   225  
   226  type CompatibilityTeamID struct {
   227  	Typ__    TeamType `codec:"typ" json:"typ"`
   228  	Legacy__ *TLFID   `codec:"legacy,omitempty" json:"legacy,omitempty"`
   229  	Modern__ *TeamID  `codec:"modern,omitempty" json:"modern,omitempty"`
   230  }
   231  
   232  func (o *CompatibilityTeamID) Typ() (ret TeamType, err error) {
   233  	switch o.Typ__ {
   234  	case TeamType_LEGACY:
   235  		if o.Legacy__ == nil {
   236  			err = errors.New("unexpected nil value for Legacy__")
   237  			return ret, err
   238  		}
   239  	case TeamType_MODERN:
   240  		if o.Modern__ == nil {
   241  			err = errors.New("unexpected nil value for Modern__")
   242  			return ret, err
   243  		}
   244  	}
   245  	return o.Typ__, nil
   246  }
   247  
   248  func (o CompatibilityTeamID) Legacy() (res TLFID) {
   249  	if o.Typ__ != TeamType_LEGACY {
   250  		panic("wrong case accessed")
   251  	}
   252  	if o.Legacy__ == nil {
   253  		return
   254  	}
   255  	return *o.Legacy__
   256  }
   257  
   258  func (o CompatibilityTeamID) Modern() (res TeamID) {
   259  	if o.Typ__ != TeamType_MODERN {
   260  		panic("wrong case accessed")
   261  	}
   262  	if o.Modern__ == nil {
   263  		return
   264  	}
   265  	return *o.Modern__
   266  }
   267  
   268  func NewCompatibilityTeamIDWithLegacy(v TLFID) CompatibilityTeamID {
   269  	return CompatibilityTeamID{
   270  		Typ__:    TeamType_LEGACY,
   271  		Legacy__: &v,
   272  	}
   273  }
   274  
   275  func NewCompatibilityTeamIDWithModern(v TeamID) CompatibilityTeamID {
   276  	return CompatibilityTeamID{
   277  		Typ__:    TeamType_MODERN,
   278  		Modern__: &v,
   279  	}
   280  }
   281  
   282  func (o CompatibilityTeamID) DeepCopy() CompatibilityTeamID {
   283  	return CompatibilityTeamID{
   284  		Typ__: o.Typ__.DeepCopy(),
   285  		Legacy__: (func(x *TLFID) *TLFID {
   286  			if x == nil {
   287  				return nil
   288  			}
   289  			tmp := (*x).DeepCopy()
   290  			return &tmp
   291  		})(o.Legacy__),
   292  		Modern__: (func(x *TeamID) *TeamID {
   293  			if x == nil {
   294  				return nil
   295  			}
   296  			tmp := (*x).DeepCopy()
   297  			return &tmp
   298  		})(o.Modern__),
   299  	}
   300  }
   301  
   302  type TLFVisibility int
   303  
   304  const (
   305  	TLFVisibility_ANY     TLFVisibility = 0
   306  	TLFVisibility_PUBLIC  TLFVisibility = 1
   307  	TLFVisibility_PRIVATE TLFVisibility = 2
   308  )
   309  
   310  func (o TLFVisibility) DeepCopy() TLFVisibility { return o }
   311  
   312  var TLFVisibilityMap = map[string]TLFVisibility{
   313  	"ANY":     0,
   314  	"PUBLIC":  1,
   315  	"PRIVATE": 2,
   316  }
   317  
   318  var TLFVisibilityRevMap = map[TLFVisibility]string{
   319  	0: "ANY",
   320  	1: "PUBLIC",
   321  	2: "PRIVATE",
   322  }
   323  
   324  func (e TLFVisibility) String() string {
   325  	if v, ok := TLFVisibilityRevMap[e]; ok {
   326  		return v
   327  	}
   328  	return fmt.Sprintf("%v", int(e))
   329  }
   330  
   331  type TeamIDWithVisibility struct {
   332  	TeamID     TeamID        `codec:"teamID" json:"teamID"`
   333  	Visibility TLFVisibility `codec:"visibility" json:"visibility"`
   334  }
   335  
   336  func (o TeamIDWithVisibility) DeepCopy() TeamIDWithVisibility {
   337  	return TeamIDWithVisibility{
   338  		TeamID:     o.TeamID.DeepCopy(),
   339  		Visibility: o.Visibility.DeepCopy(),
   340  	}
   341  }
   342  
   343  type TeamIDAndName struct {
   344  	Id   TeamID   `codec:"id" json:"id"`
   345  	Name TeamName `codec:"name" json:"name"`
   346  }
   347  
   348  func (o TeamIDAndName) DeepCopy() TeamIDAndName {
   349  	return TeamIDAndName{
   350  		Id:   o.Id.DeepCopy(),
   351  		Name: o.Name.DeepCopy(),
   352  	}
   353  }
   354  
   355  type Seqno int64
   356  
   357  func (o Seqno) DeepCopy() Seqno {
   358  	return o
   359  }
   360  
   361  type SeqType int
   362  
   363  const (
   364  	SeqType_NONE                SeqType = 0
   365  	SeqType_PUBLIC              SeqType = 1
   366  	SeqType_PRIVATE             SeqType = 2
   367  	SeqType_SEMIPRIVATE         SeqType = 3
   368  	SeqType_USER_PRIVATE_HIDDEN SeqType = 16
   369  	SeqType_TEAM_PRIVATE_HIDDEN SeqType = 17
   370  )
   371  
   372  func (o SeqType) DeepCopy() SeqType { return o }
   373  
   374  var SeqTypeMap = map[string]SeqType{
   375  	"NONE":                0,
   376  	"PUBLIC":              1,
   377  	"PRIVATE":             2,
   378  	"SEMIPRIVATE":         3,
   379  	"USER_PRIVATE_HIDDEN": 16,
   380  	"TEAM_PRIVATE_HIDDEN": 17,
   381  }
   382  
   383  var SeqTypeRevMap = map[SeqType]string{
   384  	0:  "NONE",
   385  	1:  "PUBLIC",
   386  	2:  "PRIVATE",
   387  	3:  "SEMIPRIVATE",
   388  	16: "USER_PRIVATE_HIDDEN",
   389  	17: "TEAM_PRIVATE_HIDDEN",
   390  }
   391  
   392  func (e SeqType) String() string {
   393  	if v, ok := SeqTypeRevMap[e]; ok {
   394  		return v
   395  	}
   396  	return fmt.Sprintf("%v", int(e))
   397  }
   398  
   399  type Bytes32 [32]byte
   400  
   401  func (o Bytes32) DeepCopy() Bytes32 {
   402  	var ret Bytes32
   403  	copy(ret[:], o[:])
   404  	return ret
   405  }
   406  
   407  type Text struct {
   408  	Data   string `codec:"data" json:"data"`
   409  	Markup bool   `codec:"markup" json:"markup"`
   410  }
   411  
   412  func (o Text) DeepCopy() Text {
   413  	return Text{
   414  		Data:   o.Data,
   415  		Markup: o.Markup,
   416  	}
   417  }
   418  
   419  type PGPIdentity struct {
   420  	Username string `codec:"username" json:"username"`
   421  	Comment  string `codec:"comment" json:"comment"`
   422  	Email    string `codec:"email" json:"email"`
   423  }
   424  
   425  func (o PGPIdentity) DeepCopy() PGPIdentity {
   426  	return PGPIdentity{
   427  		Username: o.Username,
   428  		Comment:  o.Comment,
   429  		Email:    o.Email,
   430  	}
   431  }
   432  
   433  type PublicKey struct {
   434  	KID               KID           `codec:"KID" json:"KID"`
   435  	PGPFingerprint    string        `codec:"PGPFingerprint" json:"PGPFingerprint"`
   436  	PGPIdentities     []PGPIdentity `codec:"PGPIdentities" json:"PGPIdentities"`
   437  	IsSibkey          bool          `codec:"isSibkey" json:"isSibkey"`
   438  	IsEldest          bool          `codec:"isEldest" json:"isEldest"`
   439  	ParentID          string        `codec:"parentID" json:"parentID"`
   440  	DeviceID          DeviceID      `codec:"deviceID" json:"deviceID"`
   441  	DeviceDescription string        `codec:"deviceDescription" json:"deviceDescription"`
   442  	DeviceType        DeviceTypeV2  `codec:"deviceType" json:"deviceType"`
   443  	CTime             Time          `codec:"cTime" json:"cTime"`
   444  	ETime             Time          `codec:"eTime" json:"eTime"`
   445  	IsRevoked         bool          `codec:"isRevoked" json:"isRevoked"`
   446  }
   447  
   448  func (o PublicKey) DeepCopy() PublicKey {
   449  	return PublicKey{
   450  		KID:            o.KID.DeepCopy(),
   451  		PGPFingerprint: o.PGPFingerprint,
   452  		PGPIdentities: (func(x []PGPIdentity) []PGPIdentity {
   453  			if x == nil {
   454  				return nil
   455  			}
   456  			ret := make([]PGPIdentity, len(x))
   457  			for i, v := range x {
   458  				vCopy := v.DeepCopy()
   459  				ret[i] = vCopy
   460  			}
   461  			return ret
   462  		})(o.PGPIdentities),
   463  		IsSibkey:          o.IsSibkey,
   464  		IsEldest:          o.IsEldest,
   465  		ParentID:          o.ParentID,
   466  		DeviceID:          o.DeviceID.DeepCopy(),
   467  		DeviceDescription: o.DeviceDescription,
   468  		DeviceType:        o.DeviceType.DeepCopy(),
   469  		CTime:             o.CTime.DeepCopy(),
   470  		ETime:             o.ETime.DeepCopy(),
   471  		IsRevoked:         o.IsRevoked,
   472  	}
   473  }
   474  
   475  type KeybaseTime struct {
   476  	Unix  Time  `codec:"unix" json:"unix"`
   477  	Chain Seqno `codec:"chain" json:"chain"`
   478  }
   479  
   480  func (o KeybaseTime) DeepCopy() KeybaseTime {
   481  	return KeybaseTime{
   482  		Unix:  o.Unix.DeepCopy(),
   483  		Chain: o.Chain.DeepCopy(),
   484  	}
   485  }
   486  
   487  type RevokedKey struct {
   488  	Key  PublicKey   `codec:"key" json:"key"`
   489  	Time KeybaseTime `codec:"time" json:"time"`
   490  	By   KID         `codec:"by" json:"by"`
   491  }
   492  
   493  func (o RevokedKey) DeepCopy() RevokedKey {
   494  	return RevokedKey{
   495  		Key:  o.Key.DeepCopy(),
   496  		Time: o.Time.DeepCopy(),
   497  		By:   o.By.DeepCopy(),
   498  	}
   499  }
   500  
   501  type User struct {
   502  	Uid      UID    `codec:"uid" json:"uid"`
   503  	Username string `codec:"username" json:"username"`
   504  }
   505  
   506  func (o User) DeepCopy() User {
   507  	return User{
   508  		Uid:      o.Uid.DeepCopy(),
   509  		Username: o.Username,
   510  	}
   511  }
   512  
   513  type Device struct {
   514  	Type               DeviceTypeV2 `codec:"type" json:"type"`
   515  	Name               string       `codec:"name" json:"name"`
   516  	DeviceID           DeviceID     `codec:"deviceID" json:"deviceID"`
   517  	DeviceNumberOfType int          `codec:"deviceNumberOfType" json:"deviceNumberOfType"`
   518  	CTime              Time         `codec:"cTime" json:"cTime"`
   519  	MTime              Time         `codec:"mTime" json:"mTime"`
   520  	LastUsedTime       Time         `codec:"lastUsedTime" json:"lastUsedTime"`
   521  	EncryptKey         KID          `codec:"encryptKey" json:"encryptKey"`
   522  	VerifyKey          KID          `codec:"verifyKey" json:"verifyKey"`
   523  	Status             int          `codec:"status" json:"status"`
   524  }
   525  
   526  func (o Device) DeepCopy() Device {
   527  	return Device{
   528  		Type:               o.Type.DeepCopy(),
   529  		Name:               o.Name,
   530  		DeviceID:           o.DeviceID.DeepCopy(),
   531  		DeviceNumberOfType: o.DeviceNumberOfType,
   532  		CTime:              o.CTime.DeepCopy(),
   533  		MTime:              o.MTime.DeepCopy(),
   534  		LastUsedTime:       o.LastUsedTime.DeepCopy(),
   535  		EncryptKey:         o.EncryptKey.DeepCopy(),
   536  		VerifyKey:          o.VerifyKey.DeepCopy(),
   537  		Status:             o.Status,
   538  	}
   539  }
   540  
   541  type DeviceType int
   542  
   543  const (
   544  	DeviceType_DESKTOP DeviceType = 0
   545  	DeviceType_MOBILE  DeviceType = 1
   546  )
   547  
   548  func (o DeviceType) DeepCopy() DeviceType { return o }
   549  
   550  var DeviceTypeMap = map[string]DeviceType{
   551  	"DESKTOP": 0,
   552  	"MOBILE":  1,
   553  }
   554  
   555  var DeviceTypeRevMap = map[DeviceType]string{
   556  	0: "DESKTOP",
   557  	1: "MOBILE",
   558  }
   559  
   560  func (e DeviceType) String() string {
   561  	if v, ok := DeviceTypeRevMap[e]; ok {
   562  		return v
   563  	}
   564  	return fmt.Sprintf("%v", int(e))
   565  }
   566  
   567  type DeviceTypeV2 string
   568  
   569  func (o DeviceTypeV2) DeepCopy() DeviceTypeV2 {
   570  	return o
   571  }
   572  
   573  type Stream struct {
   574  	Fd int `codec:"fd" json:"fd"`
   575  }
   576  
   577  func (o Stream) DeepCopy() Stream {
   578  	return Stream{
   579  		Fd: o.Fd,
   580  	}
   581  }
   582  
   583  type LogLevel int
   584  
   585  const (
   586  	LogLevel_NONE     LogLevel = 0
   587  	LogLevel_DEBUG    LogLevel = 1
   588  	LogLevel_INFO     LogLevel = 2
   589  	LogLevel_NOTICE   LogLevel = 3
   590  	LogLevel_WARN     LogLevel = 4
   591  	LogLevel_ERROR    LogLevel = 5
   592  	LogLevel_CRITICAL LogLevel = 6
   593  	LogLevel_FATAL    LogLevel = 7
   594  )
   595  
   596  func (o LogLevel) DeepCopy() LogLevel { return o }
   597  
   598  var LogLevelMap = map[string]LogLevel{
   599  	"NONE":     0,
   600  	"DEBUG":    1,
   601  	"INFO":     2,
   602  	"NOTICE":   3,
   603  	"WARN":     4,
   604  	"ERROR":    5,
   605  	"CRITICAL": 6,
   606  	"FATAL":    7,
   607  }
   608  
   609  var LogLevelRevMap = map[LogLevel]string{
   610  	0: "NONE",
   611  	1: "DEBUG",
   612  	2: "INFO",
   613  	3: "NOTICE",
   614  	4: "WARN",
   615  	5: "ERROR",
   616  	6: "CRITICAL",
   617  	7: "FATAL",
   618  }
   619  
   620  func (e LogLevel) String() string {
   621  	if v, ok := LogLevelRevMap[e]; ok {
   622  		return v
   623  	}
   624  	return fmt.Sprintf("%v", int(e))
   625  }
   626  
   627  type ClientType int
   628  
   629  const (
   630  	ClientType_NONE       ClientType = 0
   631  	ClientType_CLI        ClientType = 1
   632  	ClientType_GUI_MAIN   ClientType = 2
   633  	ClientType_KBFS       ClientType = 3
   634  	ClientType_GUI_HELPER ClientType = 4
   635  )
   636  
   637  func (o ClientType) DeepCopy() ClientType { return o }
   638  
   639  var ClientTypeMap = map[string]ClientType{
   640  	"NONE":       0,
   641  	"CLI":        1,
   642  	"GUI_MAIN":   2,
   643  	"KBFS":       3,
   644  	"GUI_HELPER": 4,
   645  }
   646  
   647  var ClientTypeRevMap = map[ClientType]string{
   648  	0: "NONE",
   649  	1: "CLI",
   650  	2: "GUI_MAIN",
   651  	3: "KBFS",
   652  	4: "GUI_HELPER",
   653  }
   654  
   655  type KBFSPathInfo struct {
   656  	StandardPath           string `codec:"standardPath" json:"standardPath"`
   657  	DeeplinkPath           string `codec:"deeplinkPath" json:"deeplinkPath"`
   658  	PlatformAfterMountPath string `codec:"platformAfterMountPath" json:"platformAfterMountPath"`
   659  }
   660  
   661  func (o KBFSPathInfo) DeepCopy() KBFSPathInfo {
   662  	return KBFSPathInfo{
   663  		StandardPath:           o.StandardPath,
   664  		DeeplinkPath:           o.DeeplinkPath,
   665  		PlatformAfterMountPath: o.PlatformAfterMountPath,
   666  	}
   667  }
   668  
   669  type UserVersionVector struct {
   670  	Id       int64 `codec:"id" json:"id"`
   671  	SigHints int   `codec:"sigHints" json:"sigHints"`
   672  	SigChain int64 `codec:"sigChain" json:"sigChain"`
   673  	CachedAt Time  `codec:"cachedAt" json:"cachedAt"`
   674  }
   675  
   676  func (o UserVersionVector) DeepCopy() UserVersionVector {
   677  	return UserVersionVector{
   678  		Id:       o.Id,
   679  		SigHints: o.SigHints,
   680  		SigChain: o.SigChain,
   681  		CachedAt: o.CachedAt.DeepCopy(),
   682  	}
   683  }
   684  
   685  type PerUserKeyGeneration int
   686  
   687  func (o PerUserKeyGeneration) DeepCopy() PerUserKeyGeneration {
   688  	return o
   689  }
   690  
   691  type PerUserKey struct {
   692  	Gen         int   `codec:"gen" json:"gen"`
   693  	Seqno       Seqno `codec:"seqno" json:"seqno"`
   694  	SigKID      KID   `codec:"sigKID" json:"sigKID"`
   695  	EncKID      KID   `codec:"encKID" json:"encKID"`
   696  	SignedByKID KID   `codec:"signedByKID" json:"signedByKID"`
   697  }
   698  
   699  func (o PerUserKey) DeepCopy() PerUserKey {
   700  	return PerUserKey{
   701  		Gen:         o.Gen,
   702  		Seqno:       o.Seqno.DeepCopy(),
   703  		SigKID:      o.SigKID.DeepCopy(),
   704  		EncKID:      o.EncKID.DeepCopy(),
   705  		SignedByKID: o.SignedByKID.DeepCopy(),
   706  	}
   707  }
   708  
   709  type UserPlusKeys struct {
   710  	Uid               UID               `codec:"uid" json:"uid"`
   711  	Username          string            `codec:"username" json:"username"`
   712  	EldestSeqno       Seqno             `codec:"eldestSeqno" json:"eldestSeqno"`
   713  	Status            StatusCode        `codec:"status" json:"status"`
   714  	DeviceKeys        []PublicKey       `codec:"deviceKeys" json:"deviceKeys"`
   715  	RevokedDeviceKeys []RevokedKey      `codec:"revokedDeviceKeys" json:"revokedDeviceKeys"`
   716  	PGPKeyCount       int               `codec:"pgpKeyCount" json:"pgpKeyCount"`
   717  	Uvv               UserVersionVector `codec:"uvv" json:"uvv"`
   718  	DeletedDeviceKeys []PublicKey       `codec:"deletedDeviceKeys" json:"deletedDeviceKeys"`
   719  	PerUserKeys       []PerUserKey      `codec:"perUserKeys" json:"perUserKeys"`
   720  	Resets            []ResetSummary    `codec:"resets" json:"resets"`
   721  }
   722  
   723  func (o UserPlusKeys) DeepCopy() UserPlusKeys {
   724  	return UserPlusKeys{
   725  		Uid:         o.Uid.DeepCopy(),
   726  		Username:    o.Username,
   727  		EldestSeqno: o.EldestSeqno.DeepCopy(),
   728  		Status:      o.Status.DeepCopy(),
   729  		DeviceKeys: (func(x []PublicKey) []PublicKey {
   730  			if x == nil {
   731  				return nil
   732  			}
   733  			ret := make([]PublicKey, len(x))
   734  			for i, v := range x {
   735  				vCopy := v.DeepCopy()
   736  				ret[i] = vCopy
   737  			}
   738  			return ret
   739  		})(o.DeviceKeys),
   740  		RevokedDeviceKeys: (func(x []RevokedKey) []RevokedKey {
   741  			if x == nil {
   742  				return nil
   743  			}
   744  			ret := make([]RevokedKey, len(x))
   745  			for i, v := range x {
   746  				vCopy := v.DeepCopy()
   747  				ret[i] = vCopy
   748  			}
   749  			return ret
   750  		})(o.RevokedDeviceKeys),
   751  		PGPKeyCount: o.PGPKeyCount,
   752  		Uvv:         o.Uvv.DeepCopy(),
   753  		DeletedDeviceKeys: (func(x []PublicKey) []PublicKey {
   754  			if x == nil {
   755  				return nil
   756  			}
   757  			ret := make([]PublicKey, len(x))
   758  			for i, v := range x {
   759  				vCopy := v.DeepCopy()
   760  				ret[i] = vCopy
   761  			}
   762  			return ret
   763  		})(o.DeletedDeviceKeys),
   764  		PerUserKeys: (func(x []PerUserKey) []PerUserKey {
   765  			if x == nil {
   766  				return nil
   767  			}
   768  			ret := make([]PerUserKey, len(x))
   769  			for i, v := range x {
   770  				vCopy := v.DeepCopy()
   771  				ret[i] = vCopy
   772  			}
   773  			return ret
   774  		})(o.PerUserKeys),
   775  		Resets: (func(x []ResetSummary) []ResetSummary {
   776  			if x == nil {
   777  				return nil
   778  			}
   779  			ret := make([]ResetSummary, len(x))
   780  			for i, v := range x {
   781  				vCopy := v.DeepCopy()
   782  				ret[i] = vCopy
   783  			}
   784  			return ret
   785  		})(o.Resets),
   786  	}
   787  }
   788  
   789  type UserOrTeamLite struct {
   790  	Id   UserOrTeamID `codec:"id" json:"id"`
   791  	Name string       `codec:"name" json:"name"`
   792  }
   793  
   794  func (o UserOrTeamLite) DeepCopy() UserOrTeamLite {
   795  	return UserOrTeamLite{
   796  		Id:   o.Id.DeepCopy(),
   797  		Name: o.Name,
   798  	}
   799  }
   800  
   801  type UserOrTeamResult int
   802  
   803  const (
   804  	UserOrTeamResult_USER UserOrTeamResult = 1
   805  	UserOrTeamResult_TEAM UserOrTeamResult = 2
   806  )
   807  
   808  func (o UserOrTeamResult) DeepCopy() UserOrTeamResult { return o }
   809  
   810  var UserOrTeamResultMap = map[string]UserOrTeamResult{
   811  	"USER": 1,
   812  	"TEAM": 2,
   813  }
   814  
   815  var UserOrTeamResultRevMap = map[UserOrTeamResult]string{
   816  	1: "USER",
   817  	2: "TEAM",
   818  }
   819  
   820  func (e UserOrTeamResult) String() string {
   821  	if v, ok := UserOrTeamResultRevMap[e]; ok {
   822  		return v
   823  	}
   824  	return fmt.Sprintf("%v", int(e))
   825  }
   826  
   827  type RemoteTrack struct {
   828  	Username string `codec:"username" json:"username"`
   829  	Uid      UID    `codec:"uid" json:"uid"`
   830  	LinkID   LinkID `codec:"linkID" json:"linkID"`
   831  }
   832  
   833  func (o RemoteTrack) DeepCopy() RemoteTrack {
   834  	return RemoteTrack{
   835  		Username: o.Username,
   836  		Uid:      o.Uid.DeepCopy(),
   837  		LinkID:   o.LinkID.DeepCopy(),
   838  	}
   839  }
   840  
   841  type UserPlusAllKeys struct {
   842  	Base         UserPlusKeys  `codec:"base" json:"base"`
   843  	PGPKeys      []PublicKey   `codec:"pgpKeys" json:"pgpKeys"`
   844  	RemoteTracks []RemoteTrack `codec:"remoteTracks" json:"remoteTracks"`
   845  }
   846  
   847  func (o UserPlusAllKeys) DeepCopy() UserPlusAllKeys {
   848  	return UserPlusAllKeys{
   849  		Base: o.Base.DeepCopy(),
   850  		PGPKeys: (func(x []PublicKey) []PublicKey {
   851  			if x == nil {
   852  				return nil
   853  			}
   854  			ret := make([]PublicKey, len(x))
   855  			for i, v := range x {
   856  				vCopy := v.DeepCopy()
   857  				ret[i] = vCopy
   858  			}
   859  			return ret
   860  		})(o.PGPKeys),
   861  		RemoteTracks: (func(x []RemoteTrack) []RemoteTrack {
   862  			if x == nil {
   863  				return nil
   864  			}
   865  			ret := make([]RemoteTrack, len(x))
   866  			for i, v := range x {
   867  				vCopy := v.DeepCopy()
   868  				ret[i] = vCopy
   869  			}
   870  			return ret
   871  		})(o.RemoteTracks),
   872  	}
   873  }
   874  
   875  type MerkleTreeID int
   876  
   877  const (
   878  	MerkleTreeID_MASTER           MerkleTreeID = 0
   879  	MerkleTreeID_KBFS_PUBLIC      MerkleTreeID = 1
   880  	MerkleTreeID_KBFS_PRIVATE     MerkleTreeID = 2
   881  	MerkleTreeID_KBFS_PRIVATETEAM MerkleTreeID = 3
   882  )
   883  
   884  func (o MerkleTreeID) DeepCopy() MerkleTreeID { return o }
   885  
   886  var MerkleTreeIDMap = map[string]MerkleTreeID{
   887  	"MASTER":           0,
   888  	"KBFS_PUBLIC":      1,
   889  	"KBFS_PRIVATE":     2,
   890  	"KBFS_PRIVATETEAM": 3,
   891  }
   892  
   893  var MerkleTreeIDRevMap = map[MerkleTreeID]string{
   894  	0: "MASTER",
   895  	1: "KBFS_PUBLIC",
   896  	2: "KBFS_PRIVATE",
   897  	3: "KBFS_PRIVATETEAM",
   898  }
   899  
   900  // SocialAssertionService is a service that can be used to assert proofs for a
   901  // user.
   902  type SocialAssertionService string
   903  
   904  func (o SocialAssertionService) DeepCopy() SocialAssertionService {
   905  	return o
   906  }
   907  
   908  // SocialAssertion contains a service and username for that service, that
   909  // together form an assertion about a user. It can either be a social
   910  // assertion (like "facebook" or "twitter") or a server trust assertion (like
   911  // "phone" or "email").
   912  //
   913  // If the assertion is for social network, resolving an assertion requires
   914  // that the user posts a Keybase proof on the asserted service as the asserted
   915  // user.
   916  //
   917  // For server trust assertion, we have to trust the server.
   918  type SocialAssertion struct {
   919  	User    string                 `codec:"user" json:"user"`
   920  	Service SocialAssertionService `codec:"service" json:"service"`
   921  }
   922  
   923  func (o SocialAssertion) DeepCopy() SocialAssertion {
   924  	return SocialAssertion{
   925  		User:    o.User,
   926  		Service: o.Service.DeepCopy(),
   927  	}
   928  }
   929  
   930  type FullName string
   931  
   932  func (o FullName) DeepCopy() FullName {
   933  	return o
   934  }
   935  
   936  type FullNamePackageVersion int
   937  
   938  const (
   939  	FullNamePackageVersion_V0 FullNamePackageVersion = 0
   940  	FullNamePackageVersion_V1 FullNamePackageVersion = 1
   941  	FullNamePackageVersion_V2 FullNamePackageVersion = 2
   942  )
   943  
   944  func (o FullNamePackageVersion) DeepCopy() FullNamePackageVersion { return o }
   945  
   946  var FullNamePackageVersionMap = map[string]FullNamePackageVersion{
   947  	"V0": 0,
   948  	"V1": 1,
   949  	"V2": 2,
   950  }
   951  
   952  var FullNamePackageVersionRevMap = map[FullNamePackageVersion]string{
   953  	0: "V0",
   954  	1: "V1",
   955  	2: "V2",
   956  }
   957  
   958  func (e FullNamePackageVersion) String() string {
   959  	if v, ok := FullNamePackageVersionRevMap[e]; ok {
   960  		return v
   961  	}
   962  	return fmt.Sprintf("%v", int(e))
   963  }
   964  
   965  type FullNamePackage struct {
   966  	Version     FullNamePackageVersion `codec:"version" json:"version"`
   967  	FullName    FullName               `codec:"fullName" json:"fullName"`
   968  	EldestSeqno Seqno                  `codec:"eldestSeqno" json:"eldestSeqno"`
   969  	Status      StatusCode             `codec:"status" json:"status"`
   970  	CachedAt    Time                   `codec:"cachedAt" json:"cachedAt"`
   971  }
   972  
   973  func (o FullNamePackage) DeepCopy() FullNamePackage {
   974  	return FullNamePackage{
   975  		Version:     o.Version.DeepCopy(),
   976  		FullName:    o.FullName.DeepCopy(),
   977  		EldestSeqno: o.EldestSeqno.DeepCopy(),
   978  		Status:      o.Status.DeepCopy(),
   979  		CachedAt:    o.CachedAt.DeepCopy(),
   980  	}
   981  }
   982  
   983  type ImageCropRect struct {
   984  	X0 int `codec:"x0" json:"x0"`
   985  	Y0 int `codec:"y0" json:"y0"`
   986  	X1 int `codec:"x1" json:"x1"`
   987  	Y1 int `codec:"y1" json:"y1"`
   988  }
   989  
   990  func (o ImageCropRect) DeepCopy() ImageCropRect {
   991  	return ImageCropRect{
   992  		X0: o.X0,
   993  		Y0: o.Y0,
   994  		X1: o.X1,
   995  		Y1: o.Y1,
   996  	}
   997  }
   998  
   999  type PhoneLookupResult struct {
  1000  	Uid      UID      `codec:"uid" json:"uid"`
  1001  	Username string   `codec:"username" json:"username"`
  1002  	Ctime    UnixTime `codec:"ctime" json:"ctime"`
  1003  }
  1004  
  1005  func (o PhoneLookupResult) DeepCopy() PhoneLookupResult {
  1006  	return PhoneLookupResult{
  1007  		Uid:      o.Uid.DeepCopy(),
  1008  		Username: o.Username,
  1009  		Ctime:    o.Ctime.DeepCopy(),
  1010  	}
  1011  }
  1012  
  1013  type IdentityVisibility int
  1014  
  1015  const (
  1016  	IdentityVisibility_PRIVATE IdentityVisibility = 0
  1017  	IdentityVisibility_PUBLIC  IdentityVisibility = 1
  1018  )
  1019  
  1020  func (o IdentityVisibility) DeepCopy() IdentityVisibility { return o }
  1021  
  1022  var IdentityVisibilityMap = map[string]IdentityVisibility{
  1023  	"PRIVATE": 0,
  1024  	"PUBLIC":  1,
  1025  }
  1026  
  1027  var IdentityVisibilityRevMap = map[IdentityVisibility]string{
  1028  	0: "PRIVATE",
  1029  	1: "PUBLIC",
  1030  }
  1031  
  1032  func (e IdentityVisibility) String() string {
  1033  	if v, ok := IdentityVisibilityRevMap[e]; ok {
  1034  		return v
  1035  	}
  1036  	return fmt.Sprintf("%v", int(e))
  1037  }
  1038  
  1039  type SizedImage struct {
  1040  	Path  string `codec:"path" json:"path"`
  1041  	Width int    `codec:"width" json:"width"`
  1042  }
  1043  
  1044  func (o SizedImage) DeepCopy() SizedImage {
  1045  	return SizedImage{
  1046  		Path:  o.Path,
  1047  		Width: o.Width,
  1048  	}
  1049  }
  1050  
  1051  type OfflineAvailability int
  1052  
  1053  const (
  1054  	OfflineAvailability_NONE        OfflineAvailability = 0
  1055  	OfflineAvailability_BEST_EFFORT OfflineAvailability = 1
  1056  )
  1057  
  1058  func (o OfflineAvailability) DeepCopy() OfflineAvailability { return o }
  1059  
  1060  var OfflineAvailabilityMap = map[string]OfflineAvailability{
  1061  	"NONE":        0,
  1062  	"BEST_EFFORT": 1,
  1063  }
  1064  
  1065  var OfflineAvailabilityRevMap = map[OfflineAvailability]string{
  1066  	0: "NONE",
  1067  	1: "BEST_EFFORT",
  1068  }
  1069  
  1070  func (e OfflineAvailability) String() string {
  1071  	if v, ok := OfflineAvailabilityRevMap[e]; ok {
  1072  		return v
  1073  	}
  1074  	return fmt.Sprintf("%v", int(e))
  1075  }
  1076  
  1077  type UserReacji struct {
  1078  	Name             string  `codec:"name" json:"name"`
  1079  	CustomAddr       *string `codec:"customAddr,omitempty" json:"customAddr,omitempty"`
  1080  	CustomAddrNoAnim *string `codec:"customAddrNoAnim,omitempty" json:"customAddrNoAnim,omitempty"`
  1081  }
  1082  
  1083  func (o UserReacji) DeepCopy() UserReacji {
  1084  	return UserReacji{
  1085  		Name: o.Name,
  1086  		CustomAddr: (func(x *string) *string {
  1087  			if x == nil {
  1088  				return nil
  1089  			}
  1090  			tmp := (*x)
  1091  			return &tmp
  1092  		})(o.CustomAddr),
  1093  		CustomAddrNoAnim: (func(x *string) *string {
  1094  			if x == nil {
  1095  				return nil
  1096  			}
  1097  			tmp := (*x)
  1098  			return &tmp
  1099  		})(o.CustomAddrNoAnim),
  1100  	}
  1101  }
  1102  
  1103  type ReacjiSkinTone int
  1104  
  1105  const (
  1106  	ReacjiSkinTone_NONE      ReacjiSkinTone = 0
  1107  	ReacjiSkinTone_SKINTONE1 ReacjiSkinTone = 1
  1108  	ReacjiSkinTone_SKINTONE2 ReacjiSkinTone = 2
  1109  	ReacjiSkinTone_SKINTONE3 ReacjiSkinTone = 3
  1110  	ReacjiSkinTone_SKINTONE4 ReacjiSkinTone = 4
  1111  	ReacjiSkinTone_SKINTONE5 ReacjiSkinTone = 5
  1112  )
  1113  
  1114  func (o ReacjiSkinTone) DeepCopy() ReacjiSkinTone { return o }
  1115  
  1116  var ReacjiSkinToneMap = map[string]ReacjiSkinTone{
  1117  	"NONE":      0,
  1118  	"SKINTONE1": 1,
  1119  	"SKINTONE2": 2,
  1120  	"SKINTONE3": 3,
  1121  	"SKINTONE4": 4,
  1122  	"SKINTONE5": 5,
  1123  }
  1124  
  1125  var ReacjiSkinToneRevMap = map[ReacjiSkinTone]string{
  1126  	0: "NONE",
  1127  	1: "SKINTONE1",
  1128  	2: "SKINTONE2",
  1129  	3: "SKINTONE3",
  1130  	4: "SKINTONE4",
  1131  	5: "SKINTONE5",
  1132  }
  1133  
  1134  func (e ReacjiSkinTone) String() string {
  1135  	if v, ok := ReacjiSkinToneRevMap[e]; ok {
  1136  		return v
  1137  	}
  1138  	return fmt.Sprintf("%v", int(e))
  1139  }
  1140  
  1141  type UserReacjis struct {
  1142  	TopReacjis []UserReacji   `codec:"topReacjis" json:"topReacjis"`
  1143  	SkinTone   ReacjiSkinTone `codec:"skinTone" json:"skinTone"`
  1144  }
  1145  
  1146  func (o UserReacjis) DeepCopy() UserReacjis {
  1147  	return UserReacjis{
  1148  		TopReacjis: (func(x []UserReacji) []UserReacji {
  1149  			if x == nil {
  1150  				return nil
  1151  			}
  1152  			ret := make([]UserReacji, len(x))
  1153  			for i, v := range x {
  1154  				vCopy := v.DeepCopy()
  1155  				ret[i] = vCopy
  1156  			}
  1157  			return ret
  1158  		})(o.TopReacjis),
  1159  		SkinTone: o.SkinTone.DeepCopy(),
  1160  	}
  1161  }
  1162  
  1163  type WotStatusType int
  1164  
  1165  const (
  1166  	WotStatusType_NONE     WotStatusType = 0
  1167  	WotStatusType_PROPOSED WotStatusType = 1
  1168  	WotStatusType_ACCEPTED WotStatusType = 2
  1169  	WotStatusType_REJECTED WotStatusType = 3
  1170  	WotStatusType_REVOKED  WotStatusType = 4
  1171  )
  1172  
  1173  func (o WotStatusType) DeepCopy() WotStatusType { return o }
  1174  
  1175  var WotStatusTypeMap = map[string]WotStatusType{
  1176  	"NONE":     0,
  1177  	"PROPOSED": 1,
  1178  	"ACCEPTED": 2,
  1179  	"REJECTED": 3,
  1180  	"REVOKED":  4,
  1181  }
  1182  
  1183  var WotStatusTypeRevMap = map[WotStatusType]string{
  1184  	0: "NONE",
  1185  	1: "PROPOSED",
  1186  	2: "ACCEPTED",
  1187  	3: "REJECTED",
  1188  	4: "REVOKED",
  1189  }
  1190  
  1191  func (e WotStatusType) String() string {
  1192  	if v, ok := WotStatusTypeRevMap[e]; ok {
  1193  		return v
  1194  	}
  1195  	return fmt.Sprintf("%v", int(e))
  1196  }
  1197  
  1198  type CommonInterface interface {
  1199  }
  1200  
  1201  func CommonProtocol(i CommonInterface) rpc.Protocol {
  1202  	return rpc.Protocol{
  1203  		Name:    "keybase.1.Common",
  1204  		Methods: map[string]rpc.ServeHandlerDescription{},
  1205  	}
  1206  }
  1207  
  1208  type CommonClient struct {
  1209  	Cli rpc.GenericClient
  1210  }