1// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler) 2// Input file: ../client/protocol/avdl/keybase1/passphrase_common.avdl 3 4package keybase1 5 6import ( 7 "fmt" 8) 9 10type Feature struct { 11 Allow bool `codec:"allow" json:"allow"` 12 DefaultValue bool `codec:"defaultValue" json:"defaultValue"` 13 Readonly bool `codec:"readonly" json:"readonly"` 14 Label string `codec:"label" json:"label"` 15} 16 17func (o Feature) DeepCopy() Feature { 18 return Feature{ 19 Allow: o.Allow, 20 DefaultValue: o.DefaultValue, 21 Readonly: o.Readonly, 22 Label: o.Label, 23 } 24} 25 26type GUIEntryFeatures struct { 27 ShowTyping Feature `codec:"showTyping" json:"showTyping"` 28} 29 30func (o GUIEntryFeatures) DeepCopy() GUIEntryFeatures { 31 return GUIEntryFeatures{ 32 ShowTyping: o.ShowTyping.DeepCopy(), 33 } 34} 35 36type PassphraseType int 37 38const ( 39 PassphraseType_NONE PassphraseType = 0 40 PassphraseType_PAPER_KEY PassphraseType = 1 41 PassphraseType_PASS_PHRASE PassphraseType = 2 42 PassphraseType_VERIFY_PASS_PHRASE PassphraseType = 3 43) 44 45func (o PassphraseType) DeepCopy() PassphraseType { return o } 46 47var PassphraseTypeMap = map[string]PassphraseType{ 48 "NONE": 0, 49 "PAPER_KEY": 1, 50 "PASS_PHRASE": 2, 51 "VERIFY_PASS_PHRASE": 3, 52} 53 54var PassphraseTypeRevMap = map[PassphraseType]string{ 55 0: "NONE", 56 1: "PAPER_KEY", 57 2: "PASS_PHRASE", 58 3: "VERIFY_PASS_PHRASE", 59} 60 61func (e PassphraseType) String() string { 62 if v, ok := PassphraseTypeRevMap[e]; ok { 63 return v 64 } 65 return fmt.Sprintf("%v", int(e)) 66} 67 68type GUIEntryArg struct { 69 WindowTitle string `codec:"windowTitle" json:"windowTitle"` 70 Prompt string `codec:"prompt" json:"prompt"` 71 Username string `codec:"username" json:"username"` 72 SubmitLabel string `codec:"submitLabel" json:"submitLabel"` 73 CancelLabel string `codec:"cancelLabel" json:"cancelLabel"` 74 RetryLabel string `codec:"retryLabel" json:"retryLabel"` 75 Type PassphraseType `codec:"type" json:"type"` 76 Features GUIEntryFeatures `codec:"features" json:"features"` 77} 78 79func (o GUIEntryArg) DeepCopy() GUIEntryArg { 80 return GUIEntryArg{ 81 WindowTitle: o.WindowTitle, 82 Prompt: o.Prompt, 83 Username: o.Username, 84 SubmitLabel: o.SubmitLabel, 85 CancelLabel: o.CancelLabel, 86 RetryLabel: o.RetryLabel, 87 Type: o.Type.DeepCopy(), 88 Features: o.Features.DeepCopy(), 89 } 90} 91 92type GetPassphraseRes struct { 93 Passphrase string `codec:"passphrase" json:"passphrase"` 94 StoreSecret bool `codec:"storeSecret" json:"storeSecret"` 95} 96 97func (o GetPassphraseRes) DeepCopy() GetPassphraseRes { 98 return GetPassphraseRes{ 99 Passphrase: o.Passphrase, 100 StoreSecret: o.StoreSecret, 101 } 102} 103