TBR: security: Use VDL support for wire<->native conversions for Discharge.
(This change is accompanied by
https://vanadium-review.googlesource.com/6440)
VDL now supports automatic wire type <-> native type conversions
for union types, so use it for WireDischarge <-> Discharge.
Go developers can now naturally use, encode, decode Discharge objects
and not have to manually translate using the (now removed) functions
NewDischarge and MarshalDischarge.
MultiPart: 2/2
Change-Id: I2258b137138c54342562228b0229ea779b3d2131
diff --git a/services/security/discharger.vdl.go b/services/security/discharger.vdl.go
index 9c4f1e1..3ea61b1 100644
--- a/services/security/discharger.vdl.go
+++ b/services/security/discharger.vdl.go
@@ -21,7 +21,7 @@
// Discharge is called by a principal that holds a blessing with a third
// party caveat and seeks to get a discharge that proves the fulfillment of
// this caveat.
- Discharge(ctx *context.T, Caveat security.Caveat, Impetus security.DischargeImpetus, opts ...ipc.CallOpt) (Discharge security.WireDischarge, err error)
+ Discharge(ctx *context.T, Caveat security.Caveat, Impetus security.DischargeImpetus, opts ...ipc.CallOpt) (Discharge security.Discharge, err error)
}
// DischargerClientStub adds universal methods to DischargerClientMethods.
@@ -53,7 +53,7 @@
return v23.GetClient(ctx)
}
-func (c implDischargerClientStub) Discharge(ctx *context.T, i0 security.Caveat, i1 security.DischargeImpetus, opts ...ipc.CallOpt) (o0 security.WireDischarge, err error) {
+func (c implDischargerClientStub) Discharge(ctx *context.T, i0 security.Caveat, i1 security.DischargeImpetus, opts ...ipc.CallOpt) (o0 security.Discharge, err error) {
var call ipc.ClientCall
if call, err = c.c(ctx).StartCall(ctx, c.name, "Discharge", []interface{}{i0, i1}, opts...); err != nil {
return
@@ -70,7 +70,7 @@
// Discharge is called by a principal that holds a blessing with a third
// party caveat and seeks to get a discharge that proves the fulfillment of
// this caveat.
- Discharge(ctx ipc.ServerCall, Caveat security.Caveat, Impetus security.DischargeImpetus) (Discharge security.WireDischarge, err error)
+ Discharge(ctx ipc.ServerCall, Caveat security.Caveat, Impetus security.DischargeImpetus) (Discharge security.Discharge, err error)
}
// DischargerServerStubMethods is the server interface containing
@@ -108,7 +108,7 @@
gs *ipc.GlobState
}
-func (s implDischargerServerStub) Discharge(ctx ipc.ServerCall, i0 security.Caveat, i1 security.DischargeImpetus) (security.WireDischarge, error) {
+func (s implDischargerServerStub) Discharge(ctx ipc.ServerCall, i0 security.Caveat, i1 security.DischargeImpetus) (security.Discharge, error) {
return s.impl.Discharge(ctx, i0, i1)
}
@@ -137,7 +137,7 @@
{"Impetus", ``}, // security.DischargeImpetus
},
OutArgs: []ipc.ArgDesc{
- {"Discharge", ``}, // security.WireDischarge
+ {"Discharge", ``}, // security.Discharge
},
},
},