github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/keybase1/passphrase_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/passphrase_common.avdl
     3  
     4  package keybase1
     5  
     6  import (
     7  	"fmt"
     8  	"github.com/keybase/go-framed-msgpack-rpc/rpc"
     9  )
    10  
    11  type Feature struct {
    12  	Allow        bool   `codec:"allow" json:"allow"`
    13  	DefaultValue bool   `codec:"defaultValue" json:"defaultValue"`
    14  	Readonly     bool   `codec:"readonly" json:"readonly"`
    15  	Label        string `codec:"label" json:"label"`
    16  }
    17  
    18  func (o Feature) DeepCopy() Feature {
    19  	return Feature{
    20  		Allow:        o.Allow,
    21  		DefaultValue: o.DefaultValue,
    22  		Readonly:     o.Readonly,
    23  		Label:        o.Label,
    24  	}
    25  }
    26  
    27  type GUIEntryFeatures struct {
    28  	ShowTyping Feature `codec:"showTyping" json:"showTyping"`
    29  }
    30  
    31  func (o GUIEntryFeatures) DeepCopy() GUIEntryFeatures {
    32  	return GUIEntryFeatures{
    33  		ShowTyping: o.ShowTyping.DeepCopy(),
    34  	}
    35  }
    36  
    37  type PassphraseType int
    38  
    39  const (
    40  	PassphraseType_NONE               PassphraseType = 0
    41  	PassphraseType_PAPER_KEY          PassphraseType = 1
    42  	PassphraseType_PASS_PHRASE        PassphraseType = 2
    43  	PassphraseType_VERIFY_PASS_PHRASE PassphraseType = 3
    44  )
    45  
    46  func (o PassphraseType) DeepCopy() PassphraseType { return o }
    47  
    48  var PassphraseTypeMap = map[string]PassphraseType{
    49  	"NONE":               0,
    50  	"PAPER_KEY":          1,
    51  	"PASS_PHRASE":        2,
    52  	"VERIFY_PASS_PHRASE": 3,
    53  }
    54  
    55  var PassphraseTypeRevMap = map[PassphraseType]string{
    56  	0: "NONE",
    57  	1: "PAPER_KEY",
    58  	2: "PASS_PHRASE",
    59  	3: "VERIFY_PASS_PHRASE",
    60  }
    61  
    62  func (e PassphraseType) String() string {
    63  	if v, ok := PassphraseTypeRevMap[e]; ok {
    64  		return v
    65  	}
    66  	return fmt.Sprintf("%v", int(e))
    67  }
    68  
    69  type GUIEntryArg struct {
    70  	WindowTitle string           `codec:"windowTitle" json:"windowTitle"`
    71  	Prompt      string           `codec:"prompt" json:"prompt"`
    72  	Username    string           `codec:"username" json:"username"`
    73  	SubmitLabel string           `codec:"submitLabel" json:"submitLabel"`
    74  	CancelLabel string           `codec:"cancelLabel" json:"cancelLabel"`
    75  	RetryLabel  string           `codec:"retryLabel" json:"retryLabel"`
    76  	Type        PassphraseType   `codec:"type" json:"type"`
    77  	Features    GUIEntryFeatures `codec:"features" json:"features"`
    78  }
    79  
    80  func (o GUIEntryArg) DeepCopy() GUIEntryArg {
    81  	return GUIEntryArg{
    82  		WindowTitle: o.WindowTitle,
    83  		Prompt:      o.Prompt,
    84  		Username:    o.Username,
    85  		SubmitLabel: o.SubmitLabel,
    86  		CancelLabel: o.CancelLabel,
    87  		RetryLabel:  o.RetryLabel,
    88  		Type:        o.Type.DeepCopy(),
    89  		Features:    o.Features.DeepCopy(),
    90  	}
    91  }
    92  
    93  type GetPassphraseRes struct {
    94  	Passphrase  string `codec:"passphrase" json:"passphrase"`
    95  	StoreSecret bool   `codec:"storeSecret" json:"storeSecret"`
    96  }
    97  
    98  func (o GetPassphraseRes) DeepCopy() GetPassphraseRes {
    99  	return GetPassphraseRes{
   100  		Passphrase:  o.Passphrase,
   101  		StoreSecret: o.StoreSecret,
   102  	}
   103  }
   104  
   105  type PassphraseCommonInterface interface {
   106  }
   107  
   108  func PassphraseCommonProtocol(i PassphraseCommonInterface) rpc.Protocol {
   109  	return rpc.Protocol{
   110  		Name:    "keybase.1.passphraseCommon",
   111  		Methods: map[string]rpc.ServeHandlerDescription{},
   112  	}
   113  }
   114  
   115  type PassphraseCommonClient struct {
   116  	Cli rpc.GenericClient
   117  }