|
|
|
@@ -7,7 +7,10 @@ import (
|
|
|
|
|
context "context"
|
|
|
|
|
fmt "fmt"
|
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
|
v1 "github.com/spotify/backstage/backend/proto/identity/v1"
|
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
|
math "math"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
@@ -22,9 +25,80 @@ var _ = math.Inf
|
|
|
|
|
// proto package needs to be updated.
|
|
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
|
|
|
|
|
|
type Empty struct {
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Empty) Reset() { *m = Empty{} }
|
|
|
|
|
func (m *Empty) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Empty) ProtoMessage() {}
|
|
|
|
|
func (*Empty) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6737326b433dc57d, []int{0}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Empty) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_Empty.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
|
|
|
|
func (m *Empty) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_Empty.Merge(m, src)
|
|
|
|
|
}
|
|
|
|
|
func (m *Empty) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_Empty.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *Empty) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_Empty.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_Empty proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
type GetAllTemplatesResponse struct {
|
|
|
|
|
Templates []*Template `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *GetAllTemplatesResponse) Reset() { *m = GetAllTemplatesResponse{} }
|
|
|
|
|
func (m *GetAllTemplatesResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*GetAllTemplatesResponse) ProtoMessage() {}
|
|
|
|
|
func (*GetAllTemplatesResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6737326b433dc57d, []int{1}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *GetAllTemplatesResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_GetAllTemplatesResponse.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetAllTemplatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_GetAllTemplatesResponse.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetAllTemplatesResponse) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_GetAllTemplatesResponse.Merge(m, src)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetAllTemplatesResponse) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_GetAllTemplatesResponse.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *GetAllTemplatesResponse) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_GetAllTemplatesResponse.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetAllTemplatesResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
func (m *GetAllTemplatesResponse) GetTemplates() []*Template {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.Templates
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Template struct {
|
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
|
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
|
User *v1.User `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
@@ -34,7 +108,7 @@ func (m *Template) Reset() { *m = Template{} }
|
|
|
|
|
func (m *Template) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Template) ProtoMessage() {}
|
|
|
|
|
func (*Template) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6737326b433dc57d, []int{0}
|
|
|
|
|
return fileDescriptor_6737326b433dc57d, []int{2}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Template) XXX_Unmarshal(b []byte) error {
|
|
|
|
@@ -69,23 +143,39 @@ func (m *Template) GetName() string {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Template) GetUser() *v1.User {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.User
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
proto.RegisterType((*Empty)(nil), "spotify.backstage.scaffolder.v1.Empty")
|
|
|
|
|
proto.RegisterType((*GetAllTemplatesResponse)(nil), "spotify.backstage.scaffolder.v1.GetAllTemplatesResponse")
|
|
|
|
|
proto.RegisterType((*Template)(nil), "spotify.backstage.scaffolder.v1.Template")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("scaffolder/v1/scaffolder.proto", fileDescriptor_6737326b433dc57d) }
|
|
|
|
|
|
|
|
|
|
var fileDescriptor_6737326b433dc57d = []byte{
|
|
|
|
|
// 134 bytes of a gzipped FileDescriptorProto
|
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0x4e, 0x4e, 0x4c,
|
|
|
|
|
0x4b, 0xcb, 0xcf, 0x49, 0x49, 0x2d, 0xd2, 0x2f, 0x33, 0xd4, 0x47, 0xf0, 0xf4, 0x0a, 0x8a, 0xf2,
|
|
|
|
|
0x4b, 0xf2, 0x85, 0xe4, 0x8b, 0x0b, 0xf2, 0x4b, 0x32, 0xd3, 0x2a, 0xf5, 0x92, 0x12, 0x93, 0xb3,
|
|
|
|
|
0x8b, 0x4b, 0x12, 0xd3, 0x53, 0xf5, 0x90, 0xd4, 0x94, 0x19, 0x2a, 0xe9, 0x71, 0x71, 0x84, 0xa4,
|
|
|
|
|
0xe6, 0x16, 0xe4, 0x24, 0x96, 0xa4, 0x0a, 0xf1, 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30,
|
|
|
|
|
0x6a, 0x70, 0x06, 0x31, 0x65, 0xa6, 0x08, 0x09, 0x71, 0xb1, 0xe4, 0x25, 0xe6, 0xa6, 0x4a, 0x30,
|
|
|
|
|
0x81, 0x45, 0xc0, 0x6c, 0x23, 0x1e, 0x2e, 0xae, 0x60, 0xb8, 0x01, 0x4e, 0x7c, 0x51, 0x3c, 0x08,
|
|
|
|
|
0xe3, 0xca, 0x0c, 0x93, 0xd8, 0xc0, 0xb6, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x4e,
|
|
|
|
|
0xc5, 0xeb, 0x97, 0x00, 0x00, 0x00,
|
|
|
|
|
// 254 bytes of a gzipped FileDescriptorProto
|
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x4f, 0x4b, 0xc4, 0x30,
|
|
|
|
|
0x10, 0xc5, 0x49, 0x77, 0xfd, 0xb3, 0xb3, 0xb2, 0x42, 0x2e, 0x96, 0x1e, 0xb4, 0x54, 0x90, 0x7a,
|
|
|
|
|
0xc9, 0xd2, 0x7a, 0xd0, 0xab, 0x82, 0xec, 0xbd, 0xea, 0xc5, 0x5b, 0xba, 0x9d, 0x2e, 0xc1, 0xb6,
|
|
|
|
|
0x09, 0xcd, 0x58, 0xe8, 0xd1, 0x6f, 0x2e, 0x46, 0xba, 0x15, 0x51, 0x7a, 0x9b, 0x3c, 0xde, 0x2f,
|
|
|
|
|
0x33, 0xef, 0xc1, 0xb9, 0xdd, 0xca, 0xb2, 0xd4, 0x55, 0x81, 0xed, 0xba, 0x4b, 0xd6, 0xe3, 0x4b,
|
|
|
|
|
0x98, 0x56, 0x93, 0xe6, 0x17, 0xd6, 0x68, 0x52, 0x65, 0x2f, 0x72, 0xb9, 0x7d, 0xb3, 0x24, 0x77,
|
|
|
|
|
0x28, 0x7e, 0x78, 0xba, 0x24, 0x08, 0x54, 0x81, 0x0d, 0x29, 0xea, 0xbf, 0xf0, 0x61, 0xfe, 0x86,
|
|
|
|
|
0xa3, 0x23, 0x38, 0x78, 0xac, 0x0d, 0xf5, 0x51, 0x0e, 0x67, 0x1b, 0xa4, 0xfb, 0xaa, 0x7a, 0xc6,
|
|
|
|
|
0xda, 0x54, 0x92, 0xd0, 0x66, 0x68, 0x8d, 0x6e, 0x2c, 0xf2, 0x0d, 0x2c, 0x68, 0x10, 0x7d, 0x16,
|
|
|
|
|
0xce, 0xe2, 0x65, 0x7a, 0x2d, 0x26, 0x96, 0x8a, 0xe1, 0x9b, 0x6c, 0x64, 0xa3, 0x1d, 0x1c, 0x0f,
|
|
|
|
|
0x32, 0x5f, 0x81, 0xa7, 0x0a, 0x9f, 0x85, 0x2c, 0x5e, 0x64, 0x9e, 0x2a, 0x38, 0x87, 0x79, 0x23,
|
|
|
|
|
0x6b, 0xf4, 0x3d, 0xa7, 0xb8, 0x99, 0xdf, 0xc2, 0xfc, 0xdd, 0x62, 0xeb, 0xcf, 0x42, 0x16, 0x2f,
|
|
|
|
|
0xd3, 0xcb, 0x3f, 0x76, 0xee, 0xd3, 0x74, 0x89, 0x78, 0xb1, 0xd8, 0x66, 0x0e, 0x48, 0x3f, 0x18,
|
|
|
|
|
0xc0, 0xd3, 0xfe, 0x1c, 0x6e, 0xe1, 0xf4, 0x57, 0x36, 0x7e, 0x35, 0x19, 0xc0, 0xd5, 0x12, 0xdc,
|
|
|
|
|
0x4d, 0xfa, 0xfe, 0x69, 0xed, 0x61, 0xf5, 0x7a, 0x32, 0x1a, 0xbb, 0x24, 0x3f, 0x74, 0x85, 0xdf,
|
|
|
|
|
0x7c, 0x06, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x28, 0xe6, 0x58, 0xcf, 0x01, 0x00, 0x00,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
@@ -100,6 +190,7 @@ const _ = grpc.SupportPackageIsVersion6
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
type ScaffolderClient interface {
|
|
|
|
|
GetAllTemplates(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetAllTemplatesResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type scaffolderClient struct {
|
|
|
|
@@ -110,22 +201,59 @@ func NewScaffolderClient(cc grpc.ClientConnInterface) ScaffolderClient {
|
|
|
|
|
return &scaffolderClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *scaffolderClient) GetAllTemplates(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetAllTemplatesResponse, error) {
|
|
|
|
|
out := new(GetAllTemplatesResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/spotify.backstage.scaffolder.v1.Scaffolder/GetAllTemplates", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ScaffolderServer is the server API for Scaffolder service.
|
|
|
|
|
type ScaffolderServer interface {
|
|
|
|
|
GetAllTemplates(context.Context, *Empty) (*GetAllTemplatesResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UnimplementedScaffolderServer can be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedScaffolderServer struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (*UnimplementedScaffolderServer) GetAllTemplates(ctx context.Context, req *Empty) (*GetAllTemplatesResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetAllTemplates not implemented")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterScaffolderServer(s *grpc.Server, srv ScaffolderServer) {
|
|
|
|
|
s.RegisterService(&_Scaffolder_serviceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Scaffolder_GetAllTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(Empty)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(ScaffolderServer).GetAllTemplates(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/spotify.backstage.scaffolder.v1.Scaffolder/GetAllTemplates",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(ScaffolderServer).GetAllTemplates(ctx, req.(*Empty))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _Scaffolder_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "spotify.backstage.scaffolder.v1.Scaffolder",
|
|
|
|
|
HandlerType: (*ScaffolderServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
|
Metadata: "scaffolder/v1/scaffolder.proto",
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "GetAllTemplates",
|
|
|
|
|
Handler: _Scaffolder_GetAllTemplates_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
|
Metadata: "scaffolder/v1/scaffolder.proto",
|
|
|
|
|
}
|
|
|
|
|