-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_descriptor.go
31 lines (25 loc) · 1.31 KB
/
api_descriptor.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package client
// ApiDescriptor allows writing code operating on Goten API without knowing exact type.
// It can be used to access all methods and their properties, use grpc.ClientConnInterface
// without knowing exact types.
// ApiDescriptor corresponds to single Goten-API service (represented by single GRPC proto definition)
// in specific proto file.
type ApiDescriptor interface {
// GetFullAPIName returns fully qualified name that is same as used as PREFIX in
// grpc.UnaryStreamInfo (or stream equivalent) objects for all , for example
// /goten.library.v2.BookService
GetFullAPIName() string
// GetProtoPkgName returns proto package where corresponding RPC service is defined,
// for example "goten.library.v2"
GetProtoPkgName() string
// GetApiName returns Goten API name (GRPC service as defined in proto file), for example BookService
GetApiName() string
// GetServiceDomain returns domain of Goten service, as defined by field "name" in api-skeleton yaml file,
// for example library.goten.com
GetServiceDomain() string
// GetServiceVersion returns version of Goten service, as defined by field "proto.package.currentVersion"
// field in api-skeleton yaml file, for example "v1"
GetServiceVersion() string
// AllMethodDescriptors returns all method descriptors
AllMethodDescriptors() []MethodDescriptor
}