Documentation
¶
Overview ¶
Package template is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterTemplateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTemplateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TemplateServiceClient) error
- func RegisterTemplateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTemplateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TemplateServiceServer) error
- func RegisterTemplateServiceServer(s *grpc.Server, srv TemplateServiceServer)
- type CreateResponse
- type Empty
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (m *GetRequest) GetGetBy() isGetRequest_GetBy
- func (x *GetRequest) GetId() string
- func (x *GetRequest) GetName() string
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- type GetRequest_Id
- type GetRequest_Name
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (m *ListRequest) GetFilterBy() isListRequest_FilterBy
- func (x *ListRequest) GetName() string
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- type ListRequest_Name
- type TemplateServiceClient
- type TemplateServiceClientMock
- func (mock *TemplateServiceClientMock) CreateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error)
- func (mock *TemplateServiceClientMock) CreateTemplateCalls() []struct{ ... }
- func (mock *TemplateServiceClientMock) DeleteTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error)
- func (mock *TemplateServiceClientMock) DeleteTemplateCalls() []struct{ ... }
- func (mock *TemplateServiceClientMock) GetTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
- func (mock *TemplateServiceClientMock) GetTemplateCalls() []struct{ ... }
- func (mock *TemplateServiceClientMock) ListTemplates(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error)
- func (mock *TemplateServiceClientMock) ListTemplatesCalls() []struct{ ... }
- func (mock *TemplateServiceClientMock) UpdateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error)
- func (mock *TemplateServiceClientMock) UpdateTemplateCalls() []struct{ ... }
- type TemplateServiceServer
- type TemplateService_ListTemplatesClient
- type TemplateService_ListTemplatesClientMock
- func (mock *TemplateService_ListTemplatesClientMock) CloseSend() error
- func (mock *TemplateService_ListTemplatesClientMock) CloseSendCalls() []struct{}
- func (mock *TemplateService_ListTemplatesClientMock) Context() context.Context
- func (mock *TemplateService_ListTemplatesClientMock) ContextCalls() []struct{}
- func (mock *TemplateService_ListTemplatesClientMock) Header() (metadata.MD, error)
- func (mock *TemplateService_ListTemplatesClientMock) HeaderCalls() []struct{}
- func (mock *TemplateService_ListTemplatesClientMock) Recv() (*WorkflowTemplate, error)
- func (mock *TemplateService_ListTemplatesClientMock) RecvCalls() []struct{}
- func (mock *TemplateService_ListTemplatesClientMock) RecvMsg(m interface{}) error
- func (mock *TemplateService_ListTemplatesClientMock) RecvMsgCalls() []struct{ ... }
- func (mock *TemplateService_ListTemplatesClientMock) SendMsg(m interface{}) error
- func (mock *TemplateService_ListTemplatesClientMock) SendMsgCalls() []struct{ ... }
- func (mock *TemplateService_ListTemplatesClientMock) Trailer() metadata.MD
- func (mock *TemplateService_ListTemplatesClientMock) TrailerCalls() []struct{}
- type TemplateService_ListTemplatesServer
- type UnimplementedTemplateServiceServer
- func (*UnimplementedTemplateServiceServer) CreateTemplate(context.Context, *WorkflowTemplate) (*CreateResponse, error)
- func (*UnimplementedTemplateServiceServer) DeleteTemplate(context.Context, *GetRequest) (*Empty, error)
- func (*UnimplementedTemplateServiceServer) GetTemplate(context.Context, *GetRequest) (*WorkflowTemplate, error)
- func (*UnimplementedTemplateServiceServer) ListTemplates(*ListRequest, TemplateService_ListTemplatesServer) error
- func (*UnimplementedTemplateServiceServer) UpdateTemplate(context.Context, *WorkflowTemplate) (*Empty, error)
- type WorkflowTemplate
- func (*WorkflowTemplate) Descriptor() ([]byte, []int)deprecated
- func (x *WorkflowTemplate) GetCreatedAt() *timestamppb.Timestamp
- func (x *WorkflowTemplate) GetData() string
- func (x *WorkflowTemplate) GetDeletedAt() *timestamppb.Timestamp
- func (x *WorkflowTemplate) GetId() string
- func (x *WorkflowTemplate) GetName() string
- func (x *WorkflowTemplate) GetUpdatedAt() *timestamppb.Timestamp
- func (*WorkflowTemplate) ProtoMessage()
- func (x *WorkflowTemplate) ProtoReflect() protoreflect.Message
- func (x *WorkflowTemplate) Reset()
- func (x *WorkflowTemplate) String() string
Constants ¶
This section is empty.
Variables ¶
var File_template_template_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTemplateServiceHandler ¶ added in v0.2.0
func RegisterTemplateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTemplateServiceHandler registers the http handlers for service TemplateService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTemplateServiceHandlerClient ¶ added in v0.2.0
func RegisterTemplateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TemplateServiceClient) error
RegisterTemplateServiceHandlerClient registers the http handlers for service TemplateService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TemplateServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TemplateServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TemplateServiceClient" to call the correct interceptors.
func RegisterTemplateServiceHandlerFromEndpoint ¶ added in v0.2.0
func RegisterTemplateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTemplateServiceHandlerFromEndpoint is same as RegisterTemplateServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTemplateServiceHandlerServer ¶ added in v0.2.0
func RegisterTemplateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TemplateServiceServer) error
RegisterTemplateServiceHandlerServer registers the http handlers for service TemplateService to "mux". UnaryRPC :call TemplateServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTemplateServiceHandlerFromEndpoint instead.
func RegisterTemplateServiceServer ¶ added in v0.2.0
func RegisterTemplateServiceServer(s *grpc.Server, srv TemplateServiceServer)
Types ¶
type CreateResponse ¶
type CreateResponse struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
CreateResponse returns the ID of the created template
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetId ¶
func (x *CreateResponse) GetId() string
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶ added in v0.2.0
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
Empty represents an empty response
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶ added in v0.2.0
func (x *Empty) ProtoReflect() protoreflect.Message
type GetRequest ¶
type GetRequest struct {
// Types that are assignable to GetBy:
// *GetRequest_Id
// *GetRequest_Name
GetBy isGetRequest_GetBy `protobuf_oneof:"get_by"`
// contains filtered or unexported fields
}
GetRequest enables you to filter templates by name or id.
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetGetBy ¶ added in v0.2.0
func (m *GetRequest) GetGetBy() isGetRequest_GetBy
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() string
func (*GetRequest) GetName ¶ added in v0.2.0
func (x *GetRequest) GetName() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶ added in v0.2.0
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetRequest_Id ¶ added in v0.2.0
type GetRequest_Id struct {
//
// Filter by the template id
Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"`
}
type GetRequest_Name ¶ added in v0.2.0
type GetRequest_Name struct {
//
// Filter by the template name
Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
}
type ListRequest ¶ added in v0.2.0
type ListRequest struct {
// Types that are assignable to FilterBy:
// *ListRequest_Name
FilterBy isListRequest_FilterBy `protobuf_oneof:"filter_by"`
// contains filtered or unexported fields
}
The request to use during a List template request
func (*ListRequest) Descriptor
deprecated
added in
v0.2.0
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetFilterBy ¶ added in v0.2.0
func (m *ListRequest) GetFilterBy() isListRequest_FilterBy
func (*ListRequest) GetName ¶ added in v0.2.0
func (x *ListRequest) GetName() string
func (*ListRequest) ProtoMessage ¶ added in v0.2.0
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶ added in v0.2.0
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶ added in v0.2.0
func (x *ListRequest) Reset()
func (*ListRequest) String ¶ added in v0.2.0
func (x *ListRequest) String() string
type ListRequest_Name ¶ added in v0.2.0
type ListRequest_Name struct {
//
// Filter by the template name
Name string `protobuf:"bytes,1,opt,name=name,proto3,oneof"`
}
type TemplateServiceClient ¶ added in v0.2.0
type TemplateServiceClient interface {
//
// CreateTemplate stores a template in the Tinkerbell server.
CreateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error)
//
// GetTemplate returns a specific template via its identifier.
GetTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
//
// DeleteTemplate deletes a template via its identifier.
DeleteTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error)
//
// ListTemplates returns all the template stored in Tinkerbell server
ListTemplates(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error)
//
// UpdateTemplate updates a template
// TODO: Read the code and figure out how an update work
UpdateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error)
}
TemplateServiceClient is the client API for TemplateService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTemplateServiceClient ¶ added in v0.2.0
func NewTemplateServiceClient(cc grpc.ClientConnInterface) TemplateServiceClient
type TemplateServiceClientMock ¶ added in v0.5.0
type TemplateServiceClientMock struct {
// CreateTemplateFunc mocks the CreateTemplate method.
CreateTemplateFunc func(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error)
// DeleteTemplateFunc mocks the DeleteTemplate method.
DeleteTemplateFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error)
// GetTemplateFunc mocks the GetTemplate method.
GetTemplateFunc func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
// ListTemplatesFunc mocks the ListTemplates method.
ListTemplatesFunc func(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error)
// UpdateTemplateFunc mocks the UpdateTemplate method.
UpdateTemplateFunc func(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error)
// contains filtered or unexported fields
}
TemplateServiceClientMock is a mock implementation of TemplateServiceClient.
func TestSomethingThatUsesTemplateServiceClient(t *testing.T) {
// make and configure a mocked TemplateServiceClient
mockedTemplateServiceClient := &TemplateServiceClientMock{
CreateTemplateFunc: func(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error) {
panic("mock out the CreateTemplate method")
},
DeleteTemplateFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error) {
panic("mock out the DeleteTemplate method")
},
GetTemplateFunc: func(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) {
panic("mock out the GetTemplate method")
},
ListTemplatesFunc: func(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error) {
panic("mock out the ListTemplates method")
},
UpdateTemplateFunc: func(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error) {
panic("mock out the UpdateTemplate method")
},
}
// use mockedTemplateServiceClient in code that requires TemplateServiceClient
// and then make assertions.
}
func (*TemplateServiceClientMock) CreateTemplate ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) CreateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*CreateResponse, error)
CreateTemplate calls CreateTemplateFunc.
func (*TemplateServiceClientMock) CreateTemplateCalls ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) CreateTemplateCalls() []struct { Ctx context.Context In *WorkflowTemplate Opts []grpc.CallOption }
CreateTemplateCalls gets all the calls that were made to CreateTemplate. Check the length with:
len(mockedTemplateServiceClient.CreateTemplateCalls())
func (*TemplateServiceClientMock) DeleteTemplate ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) DeleteTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Empty, error)
DeleteTemplate calls DeleteTemplateFunc.
func (*TemplateServiceClientMock) DeleteTemplateCalls ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) DeleteTemplateCalls() []struct { Ctx context.Context In *GetRequest Opts []grpc.CallOption }
DeleteTemplateCalls gets all the calls that were made to DeleteTemplate. Check the length with:
len(mockedTemplateServiceClient.DeleteTemplateCalls())
func (*TemplateServiceClientMock) GetTemplate ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) GetTemplate(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
GetTemplate calls GetTemplateFunc.
func (*TemplateServiceClientMock) GetTemplateCalls ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) GetTemplateCalls() []struct { Ctx context.Context In *GetRequest Opts []grpc.CallOption }
GetTemplateCalls gets all the calls that were made to GetTemplate. Check the length with:
len(mockedTemplateServiceClient.GetTemplateCalls())
func (*TemplateServiceClientMock) ListTemplates ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) ListTemplates(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (TemplateService_ListTemplatesClient, error)
ListTemplates calls ListTemplatesFunc.
func (*TemplateServiceClientMock) ListTemplatesCalls ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) ListTemplatesCalls() []struct { Ctx context.Context In *ListRequest Opts []grpc.CallOption }
ListTemplatesCalls gets all the calls that were made to ListTemplates. Check the length with:
len(mockedTemplateServiceClient.ListTemplatesCalls())
func (*TemplateServiceClientMock) UpdateTemplate ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) UpdateTemplate(ctx context.Context, in *WorkflowTemplate, opts ...grpc.CallOption) (*Empty, error)
UpdateTemplate calls UpdateTemplateFunc.
func (*TemplateServiceClientMock) UpdateTemplateCalls ¶ added in v0.5.0
func (mock *TemplateServiceClientMock) UpdateTemplateCalls() []struct { Ctx context.Context In *WorkflowTemplate Opts []grpc.CallOption }
UpdateTemplateCalls gets all the calls that were made to UpdateTemplate. Check the length with:
len(mockedTemplateServiceClient.UpdateTemplateCalls())
type TemplateServiceServer ¶ added in v0.2.0
type TemplateServiceServer interface {
//
// CreateTemplate stores a template in the Tinkerbell server.
CreateTemplate(context.Context, *WorkflowTemplate) (*CreateResponse, error)
//
// GetTemplate returns a specific template via its identifier.
GetTemplate(context.Context, *GetRequest) (*WorkflowTemplate, error)
//
// DeleteTemplate deletes a template via its identifier.
DeleteTemplate(context.Context, *GetRequest) (*Empty, error)
//
// ListTemplates returns all the template stored in Tinkerbell server
ListTemplates(*ListRequest, TemplateService_ListTemplatesServer) error
//
// UpdateTemplate updates a template
// TODO: Read the code and figure out how an update work
UpdateTemplate(context.Context, *WorkflowTemplate) (*Empty, error)
}
TemplateServiceServer is the server API for TemplateService service.
type TemplateService_ListTemplatesClient ¶ added in v0.2.0
type TemplateService_ListTemplatesClient interface {
Recv() (*WorkflowTemplate, error)
grpc.ClientStream
}
type TemplateService_ListTemplatesClientMock ¶ added in v0.5.0
type TemplateService_ListTemplatesClientMock struct {
// CloseSendFunc mocks the CloseSend method.
CloseSendFunc func() error
// ContextFunc mocks the Context method.
ContextFunc func() context.Context
// HeaderFunc mocks the Header method.
HeaderFunc func() (metadata.MD, error)
// RecvFunc mocks the Recv method.
RecvFunc func() (*WorkflowTemplate, error)
// RecvMsgFunc mocks the RecvMsg method.
RecvMsgFunc func(m interface{}) error
// SendMsgFunc mocks the SendMsg method.
SendMsgFunc func(m interface{}) error
// TrailerFunc mocks the Trailer method.
TrailerFunc func() metadata.MD
// contains filtered or unexported fields
}
TemplateService_ListTemplatesClientMock is a mock implementation of TemplateService_ListTemplatesClient.
func TestSomethingThatUsesTemplateService_ListTemplatesClient(t *testing.T) {
// make and configure a mocked TemplateService_ListTemplatesClient
mockedTemplateService_ListTemplatesClient := &TemplateService_ListTemplatesClientMock{
CloseSendFunc: func() error {
panic("mock out the CloseSend method")
},
ContextFunc: func() context.Context {
panic("mock out the Context method")
},
HeaderFunc: func() (metadata.MD, error) {
panic("mock out the Header method")
},
RecvFunc: func() (*WorkflowTemplate, error) {
panic("mock out the Recv method")
},
RecvMsgFunc: func(m interface{}) error {
panic("mock out the RecvMsg method")
},
SendMsgFunc: func(m interface{}) error {
panic("mock out the SendMsg method")
},
TrailerFunc: func() metadata.MD {
panic("mock out the Trailer method")
},
}
// use mockedTemplateService_ListTemplatesClient in code that requires TemplateService_ListTemplatesClient
// and then make assertions.
}
func (*TemplateService_ListTemplatesClientMock) CloseSend ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) CloseSend() error
CloseSend calls CloseSendFunc.
func (*TemplateService_ListTemplatesClientMock) CloseSendCalls ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) CloseSendCalls() []struct { }
CloseSendCalls gets all the calls that were made to CloseSend. Check the length with:
len(mockedTemplateService_ListTemplatesClient.CloseSendCalls())
func (*TemplateService_ListTemplatesClientMock) Context ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) Context() context.Context
Context calls ContextFunc.
func (*TemplateService_ListTemplatesClientMock) ContextCalls ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) ContextCalls() []struct { }
ContextCalls gets all the calls that were made to Context. Check the length with:
len(mockedTemplateService_ListTemplatesClient.ContextCalls())
func (*TemplateService_ListTemplatesClientMock) Header ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) Header() (metadata.MD, error)
Header calls HeaderFunc.
func (*TemplateService_ListTemplatesClientMock) HeaderCalls ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) HeaderCalls() []struct { }
HeaderCalls gets all the calls that were made to Header. Check the length with:
len(mockedTemplateService_ListTemplatesClient.HeaderCalls())
func (*TemplateService_ListTemplatesClientMock) Recv ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) Recv() (*WorkflowTemplate, error)
Recv calls RecvFunc.
func (*TemplateService_ListTemplatesClientMock) RecvCalls ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) RecvCalls() []struct { }
RecvCalls gets all the calls that were made to Recv. Check the length with:
len(mockedTemplateService_ListTemplatesClient.RecvCalls())
func (*TemplateService_ListTemplatesClientMock) RecvMsg ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) RecvMsg(m interface{}) error
RecvMsg calls RecvMsgFunc.
func (*TemplateService_ListTemplatesClientMock) RecvMsgCalls ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) RecvMsgCalls() []struct { M interface{} }
RecvMsgCalls gets all the calls that were made to RecvMsg. Check the length with:
len(mockedTemplateService_ListTemplatesClient.RecvMsgCalls())
func (*TemplateService_ListTemplatesClientMock) SendMsg ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) SendMsg(m interface{}) error
SendMsg calls SendMsgFunc.
func (*TemplateService_ListTemplatesClientMock) SendMsgCalls ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) SendMsgCalls() []struct { M interface{} }
SendMsgCalls gets all the calls that were made to SendMsg. Check the length with:
len(mockedTemplateService_ListTemplatesClient.SendMsgCalls())
func (*TemplateService_ListTemplatesClientMock) Trailer ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) Trailer() metadata.MD
Trailer calls TrailerFunc.
func (*TemplateService_ListTemplatesClientMock) TrailerCalls ¶ added in v0.5.0
func (mock *TemplateService_ListTemplatesClientMock) TrailerCalls() []struct { }
TrailerCalls gets all the calls that were made to Trailer. Check the length with:
len(mockedTemplateService_ListTemplatesClient.TrailerCalls())
type TemplateService_ListTemplatesServer ¶ added in v0.2.0
type TemplateService_ListTemplatesServer interface {
Send(*WorkflowTemplate) error
grpc.ServerStream
}
type UnimplementedTemplateServiceServer ¶ added in v0.2.0
type UnimplementedTemplateServiceServer struct {
}
UnimplementedTemplateServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedTemplateServiceServer) CreateTemplate ¶ added in v0.2.0
func (*UnimplementedTemplateServiceServer) CreateTemplate(context.Context, *WorkflowTemplate) (*CreateResponse, error)
func (*UnimplementedTemplateServiceServer) DeleteTemplate ¶ added in v0.2.0
func (*UnimplementedTemplateServiceServer) DeleteTemplate(context.Context, *GetRequest) (*Empty, error)
func (*UnimplementedTemplateServiceServer) GetTemplate ¶ added in v0.2.0
func (*UnimplementedTemplateServiceServer) GetTemplate(context.Context, *GetRequest) (*WorkflowTemplate, error)
func (*UnimplementedTemplateServiceServer) ListTemplates ¶ added in v0.2.0
func (*UnimplementedTemplateServiceServer) ListTemplates(*ListRequest, TemplateService_ListTemplatesServer) error
func (*UnimplementedTemplateServiceServer) UpdateTemplate ¶ added in v0.2.0
func (*UnimplementedTemplateServiceServer) UpdateTemplate(context.Context, *WorkflowTemplate) (*Empty, error)
type WorkflowTemplate ¶
type WorkflowTemplate struct {
//
// The template identifier
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
//
// The name of the template. You can see it as a friendly way to remember a
// template
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
//
// When a template got created
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
//
// The last time a template was modified
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
//
// When a template got deleted. This is the value used to identify a deleted
// template as well. If empty the template can be used to generate workflows.
DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
//
// The content of the template in its YAML representation
Data string `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
WorkflowTemplate describes the template itself.
func (*WorkflowTemplate) Descriptor
deprecated
func (*WorkflowTemplate) Descriptor() ([]byte, []int)
Deprecated: Use WorkflowTemplate.ProtoReflect.Descriptor instead.
func (*WorkflowTemplate) GetCreatedAt ¶
func (x *WorkflowTemplate) GetCreatedAt() *timestamppb.Timestamp
func (*WorkflowTemplate) GetData ¶
func (x *WorkflowTemplate) GetData() string
func (*WorkflowTemplate) GetDeletedAt ¶
func (x *WorkflowTemplate) GetDeletedAt() *timestamppb.Timestamp
func (*WorkflowTemplate) GetId ¶
func (x *WorkflowTemplate) GetId() string
func (*WorkflowTemplate) GetName ¶
func (x *WorkflowTemplate) GetName() string
func (*WorkflowTemplate) GetUpdatedAt ¶
func (x *WorkflowTemplate) GetUpdatedAt() *timestamppb.Timestamp
func (*WorkflowTemplate) ProtoMessage ¶
func (*WorkflowTemplate) ProtoMessage()
func (*WorkflowTemplate) ProtoReflect ¶ added in v0.2.0
func (x *WorkflowTemplate) ProtoReflect() protoreflect.Message
func (*WorkflowTemplate) Reset ¶
func (x *WorkflowTemplate) Reset()
func (*WorkflowTemplate) String ¶
func (x *WorkflowTemplate) String() string