Documentation ¶
Index ¶
- Variables
- func RegisterGotmplServiceServer(s grpc.ServiceRegistrar, srv GotmplServiceServer)
- type ExecuteRequest
- func (*ExecuteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteRequest) GetData() *structpb.Value
- func (x *ExecuteRequest) GetMissingkey() string
- func (x *ExecuteRequest) GetPackage() string
- func (x *ExecuteRequest) GetTemplate() string
- func (*ExecuteRequest) ProtoMessage()
- func (x *ExecuteRequest) ProtoReflect() protoreflect.Message
- func (x *ExecuteRequest) Reset()
- func (x *ExecuteRequest) String() string
- type ExecuteResponse
- type GotmplServiceClient
- type GotmplServiceServer
- type UnimplementedGotmplServiceServer
- type UnsafeGotmplServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_gotmpl_v1_gotmpl_proto protoreflect.FileDescriptor
var GotmplService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gotmpl.v1.GotmplService", HandlerType: (*GotmplServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Execute", Handler: _GotmplService_Execute_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gotmpl/v1/gotmpl.proto", }
GotmplService_ServiceDesc is the grpc.ServiceDesc for GotmplService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGotmplServiceServer ¶
func RegisterGotmplServiceServer(s grpc.ServiceRegistrar, srv GotmplServiceServer)
Types ¶
type ExecuteRequest ¶
type ExecuteRequest struct { // template is the go template to execute. Template string `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` // data is the data to use as the root context when executing the template. Data *structpb.Value `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // missingkey is the missing key behavior for the template. Must be "invalid", "error", or "zero". // Defaults to "invalid". Missingkey *string `protobuf:"bytes,3,opt,name=missingkey,proto3,oneof" json:"missingkey,omitempty"` // package is the package for the template. Must be "text" or "html". // Defaults to "text". Package *string `protobuf:"bytes,4,opt,name=package,proto3,oneof" json:"package,omitempty"` // contains filtered or unexported fields }
func (*ExecuteRequest) Descriptor
deprecated
func (*ExecuteRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.
func (*ExecuteRequest) GetData ¶
func (x *ExecuteRequest) GetData() *structpb.Value
func (*ExecuteRequest) GetMissingkey ¶
func (x *ExecuteRequest) GetMissingkey() string
func (*ExecuteRequest) GetPackage ¶
func (x *ExecuteRequest) GetPackage() string
func (*ExecuteRequest) GetTemplate ¶
func (x *ExecuteRequest) GetTemplate() string
func (*ExecuteRequest) ProtoMessage ¶
func (*ExecuteRequest) ProtoMessage()
func (*ExecuteRequest) ProtoReflect ¶
func (x *ExecuteRequest) ProtoReflect() protoreflect.Message
func (*ExecuteRequest) Reset ¶
func (x *ExecuteRequest) Reset()
func (*ExecuteRequest) String ¶
func (x *ExecuteRequest) String() string
type ExecuteResponse ¶
type ExecuteResponse struct { // result is the result of executing the template. Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*ExecuteResponse) Descriptor
deprecated
func (*ExecuteResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead.
func (*ExecuteResponse) GetResult ¶
func (x *ExecuteResponse) GetResult() string
func (*ExecuteResponse) ProtoMessage ¶
func (*ExecuteResponse) ProtoMessage()
func (*ExecuteResponse) ProtoReflect ¶
func (x *ExecuteResponse) ProtoReflect() protoreflect.Message
func (*ExecuteResponse) Reset ¶
func (x *ExecuteResponse) Reset()
func (*ExecuteResponse) String ¶
func (x *ExecuteResponse) String() string
type GotmplServiceClient ¶
type GotmplServiceClient interface { // Execute executes a go template. Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) }
GotmplServiceClient is the client API for GotmplService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGotmplServiceClient ¶
func NewGotmplServiceClient(cc grpc.ClientConnInterface) GotmplServiceClient
type GotmplServiceServer ¶
type GotmplServiceServer interface { // Execute executes a go template. Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) // contains filtered or unexported methods }
GotmplServiceServer is the server API for GotmplService service. All implementations must embed UnimplementedGotmplServiceServer for forward compatibility
type UnimplementedGotmplServiceServer ¶
type UnimplementedGotmplServiceServer struct { }
UnimplementedGotmplServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGotmplServiceServer) Execute ¶
func (UnimplementedGotmplServiceServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
type UnsafeGotmplServiceServer ¶
type UnsafeGotmplServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGotmplServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GotmplServiceServer will result in compilation errors.