/
aksk.pb.micro.go
144 lines (120 loc) · 4.42 KB
/
aksk.pb.micro.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: aksk/proto/aksk.proto
package proto
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
import (
context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context
var _ client.Option
var _ server.Option
// Api Endpoints for AkSk service
func NewAkSkEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for AkSk service
type AkSkService interface {
DownloadAkSk(ctx context.Context, in *GetAkSkRequest, opts ...client.CallOption) (*GetAkSkResponse, error)
GetAkSk(ctx context.Context, in *GetAkSkRequest, opts ...client.CallOption) (*GetAkSkResponse, error)
CreateAkSk(ctx context.Context, in *AkSkCreateRequest, opts ...client.CallOption) (*AkSkBlob, error)
DeleteAkSk(ctx context.Context, in *DeleteAkSkRequest, opts ...client.CallOption) (*DeleteAkSkResponse, error)
}
type akSkService struct {
c client.Client
name string
}
func NewAkSkService(name string, c client.Client) AkSkService {
return &akSkService{
c: c,
name: name,
}
}
func (c *akSkService) DownloadAkSk(ctx context.Context, in *GetAkSkRequest, opts ...client.CallOption) (*GetAkSkResponse, error) {
req := c.c.NewRequest(c.name, "AkSk.DownloadAkSk", in)
out := new(GetAkSkResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *akSkService) GetAkSk(ctx context.Context, in *GetAkSkRequest, opts ...client.CallOption) (*GetAkSkResponse, error) {
req := c.c.NewRequest(c.name, "AkSk.GetAkSk", in)
out := new(GetAkSkResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *akSkService) CreateAkSk(ctx context.Context, in *AkSkCreateRequest, opts ...client.CallOption) (*AkSkBlob, error) {
req := c.c.NewRequest(c.name, "AkSk.CreateAkSk", in)
out := new(AkSkBlob)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *akSkService) DeleteAkSk(ctx context.Context, in *DeleteAkSkRequest, opts ...client.CallOption) (*DeleteAkSkResponse, error) {
req := c.c.NewRequest(c.name, "AkSk.DeleteAkSk", in)
out := new(DeleteAkSkResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for AkSk service
type AkSkHandler interface {
DownloadAkSk(context.Context, *GetAkSkRequest, *GetAkSkResponse) error
GetAkSk(context.Context, *GetAkSkRequest, *GetAkSkResponse) error
CreateAkSk(context.Context, *AkSkCreateRequest, *AkSkBlob) error
DeleteAkSk(context.Context, *DeleteAkSkRequest, *DeleteAkSkResponse) error
}
func RegisterAkSkHandler(s server.Server, hdlr AkSkHandler, opts ...server.HandlerOption) error {
type akSk interface {
DownloadAkSk(ctx context.Context, in *GetAkSkRequest, out *GetAkSkResponse) error
GetAkSk(ctx context.Context, in *GetAkSkRequest, out *GetAkSkResponse) error
CreateAkSk(ctx context.Context, in *AkSkCreateRequest, out *AkSkBlob) error
DeleteAkSk(ctx context.Context, in *DeleteAkSkRequest, out *DeleteAkSkResponse) error
}
type AkSk struct {
akSk
}
h := &akSkHandler{hdlr}
return s.Handle(s.NewHandler(&AkSk{h}, opts...))
}
type akSkHandler struct {
AkSkHandler
}
func (h *akSkHandler) DownloadAkSk(ctx context.Context, in *GetAkSkRequest, out *GetAkSkResponse) error {
return h.AkSkHandler.DownloadAkSk(ctx, in, out)
}
func (h *akSkHandler) GetAkSk(ctx context.Context, in *GetAkSkRequest, out *GetAkSkResponse) error {
return h.AkSkHandler.GetAkSk(ctx, in, out)
}
func (h *akSkHandler) CreateAkSk(ctx context.Context, in *AkSkCreateRequest, out *AkSkBlob) error {
return h.AkSkHandler.CreateAkSk(ctx, in, out)
}
func (h *akSkHandler) DeleteAkSk(ctx context.Context, in *DeleteAkSkRequest, out *DeleteAkSkResponse) error {
return h.AkSkHandler.DeleteAkSk(ctx, in, out)
}