| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // Package signature defines types representing interface and method signatures. |
| package signature |
| |
| // Interface describes the signature of an interface. |
| type Interface struct { |
| Name string |
| PkgPath string |
| Doc string |
| Embeds []Embed // No special ordering. |
| Methods []Method // Ordered by method name. |
| } |
| |
| // Embed describes the signature of an embedded interface. |
| type Embed struct { |
| Name string |
| PkgPath string |
| Doc string |
| } |
| |
| // Method describes the signature of an interface method. |
| type Method struct { |
| Name string |
| Doc string |
| InArgs []Arg // Input arguments |
| OutArgs []Arg // Output arguments |
| InStream ?Arg // Input stream (optional) |
| OutStream ?Arg // Output stream (optional) |
| Tags []any // Method tags |
| } |
| |
| // Arg describes the signature of a single argument. |
| type Arg struct { |
| Name string |
| Doc string |
| Type typeobject // Type of the argument. |
| } |