github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/keybase1/backend_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/backend_common.avdl
     3  
     4  package keybase1
     5  
     6  import (
     7  	"fmt"
     8  	"github.com/keybase/go-framed-msgpack-rpc/rpc"
     9  )
    10  
    11  type BlockType int
    12  
    13  const (
    14  	BlockType_DATA BlockType = 0
    15  	BlockType_MD   BlockType = 1
    16  	BlockType_GIT  BlockType = 2
    17  )
    18  
    19  func (o BlockType) DeepCopy() BlockType { return o }
    20  
    21  var BlockTypeMap = map[string]BlockType{
    22  	"DATA": 0,
    23  	"MD":   1,
    24  	"GIT":  2,
    25  }
    26  
    27  var BlockTypeRevMap = map[BlockType]string{
    28  	0: "DATA",
    29  	1: "MD",
    30  	2: "GIT",
    31  }
    32  
    33  func (e BlockType) String() string {
    34  	if v, ok := BlockTypeRevMap[e]; ok {
    35  		return v
    36  	}
    37  	return fmt.Sprintf("%v", int(e))
    38  }
    39  
    40  type BlockIdCombo struct {
    41  	BlockHash string       `codec:"blockHash" json:"blockHash"`
    42  	ChargedTo UserOrTeamID `codec:"chargedTo" json:"chargedTo"`
    43  	BlockType BlockType    `codec:"blockType" json:"blockType"`
    44  }
    45  
    46  func (o BlockIdCombo) DeepCopy() BlockIdCombo {
    47  	return BlockIdCombo{
    48  		BlockHash: o.BlockHash,
    49  		ChargedTo: o.ChargedTo.DeepCopy(),
    50  		BlockType: o.BlockType.DeepCopy(),
    51  	}
    52  }
    53  
    54  type ChallengeInfo struct {
    55  	Now       int64  `codec:"now" json:"now"`
    56  	Challenge string `codec:"challenge" json:"challenge"`
    57  }
    58  
    59  func (o ChallengeInfo) DeepCopy() ChallengeInfo {
    60  	return ChallengeInfo{
    61  		Now:       o.Now,
    62  		Challenge: o.Challenge,
    63  	}
    64  }
    65  
    66  type BackendCommonInterface interface {
    67  }
    68  
    69  func BackendCommonProtocol(i BackendCommonInterface) rpc.Protocol {
    70  	return rpc.Protocol{
    71  		Name:    "keybase.1.backendCommon",
    72  		Methods: map[string]rpc.ServeHandlerDescription{},
    73  	}
    74  }
    75  
    76  type BackendCommonClient struct {
    77  	Cli rpc.GenericClient
    78  }