| 1 | package plugin_testscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/ |
| 2 | |
| 3 | import ( |
| 4 | "logscip-go gomod github.com/golang/go/src . log/" |
| 5 | "osscip-go gomod github.com/golang/go/src . os/" |
| 6 | |
| 7 | "filippo.io/agescip-go gomod filippo.io/age . `filippo.io/age`/" |
| 8 | "filippo.io/age/pluginscip-go gomod filippo.io/age . `filippo.io/age/plugin`/" |
| 9 | ) |
| 10 | |
| 11 | type Recipientscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Recipient# struct{} |
| 12 | |
| 13 | func (r *Recipientscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Recipient#) Wrapscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Recipient#Wrap().(fileKey []byte) ([]*agescip-go gomod filippo.io/age . `filippo.io/age`/.Stanzascip-go gomod filippo.io/age . `filippo.io/age`/Stanza#, error) { |
| 14 | panic("unimplemented") |
| 15 | } |
| 16 | |
| 17 | func NewRecipientscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/NewRecipient().(data []byte) (*Recipientscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Recipient#, error) { |
| 18 | return &Recipientscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Recipient#{}, nil |
| 19 | } |
| 20 | |
| 21 | type Identityscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Identity# struct{} |
| 22 | |
| 23 | func (i *Identityscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Identity#) Unwrapscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Identity#Unwrap().(s []*agescip-go gomod filippo.io/age . `filippo.io/age`/.Stanzascip-go gomod filippo.io/age . `filippo.io/age`/Stanza#) ([]byte, error) { |
| 24 | panic("unimplemented") |
| 25 | } |
| 26 | |
| 27 | func NewIdentityscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/NewIdentity().(data []byte) (*Identityscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Identity#, error) { |
| 28 | return &Identityscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/Identity#{}, nil |
| 29 | } |
| 30 | |
| 31 | func ExamplePlugin_mainscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/ExamplePlugin_main().() { |
| 32 | p, err := pluginscip-go gomod filippo.io/age . `filippo.io/age/plugin`/.Newscip-go gomod filippo.io/age . `filippo.io/age/plugin`/New().("example") |
| 33 | if err != nil { |
| 34 | logscip-go gomod github.com/golang/go/src . log/.Fatalscip-go gomod github.com/golang/go/src . log/Fatal().(err) |
| 35 | } |
| 36 | p.HandleRecipientscip-go gomod filippo.io/age . `filippo.io/age/plugin`/Plugin#HandleRecipient().(func(data []byte) (agescip-go gomod filippo.io/age . `filippo.io/age`/.Recipientscip-go gomod filippo.io/age . `filippo.io/age`/Recipient#, error) { |
| 37 | return NewRecipientscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/NewRecipient().(data) |
| 38 | }) |
| 39 | p.HandleIdentityscip-go gomod filippo.io/age . `filippo.io/age/plugin`/Plugin#HandleIdentity().(func(data []byte) (agescip-go gomod filippo.io/age . `filippo.io/age`/.Identityscip-go gomod filippo.io/age . `filippo.io/age`/Identity#, error) { |
| 40 | return NewIdentityscip-go gomod filippo.io/age . `filippo.io/age/plugin_test`/NewIdentity().(data) |
| 41 | }) |
| 42 | osscip-go gomod github.com/golang/go/src . os/.Exitscip-go gomod github.com/golang/go/src . os/Exit().(p.Mainscip-go gomod filippo.io/age . `filippo.io/age/plugin`/Plugin#Main().()) |
| 43 | } |