talos/api/time/time.pb.go
Brad Beam ee24e42319 feat: Add time api to apid
This extends apid to cover the time api.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-10-25 14:35:14 -07:00

322 lines
11 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: time/time.proto
package time
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
grpc "google.golang.org/grpc"
common "github.com/talos-systems/talos/api/common"
)
// 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
// The response message containing the ntp server
type TimeRequest struct {
Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TimeRequest) Reset() { *m = TimeRequest{} }
func (m *TimeRequest) String() string { return proto.CompactTextString(m) }
func (*TimeRequest) ProtoMessage() {}
func (*TimeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e7ed1ef5b20ef4ce, []int{0}
}
func (m *TimeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeRequest.Unmarshal(m, b)
}
func (m *TimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TimeRequest.Marshal(b, m, deterministic)
}
func (m *TimeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_TimeRequest.Merge(m, src)
}
func (m *TimeRequest) XXX_Size() int {
return xxx_messageInfo_TimeRequest.Size(m)
}
func (m *TimeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_TimeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_TimeRequest proto.InternalMessageInfo
func (m *TimeRequest) GetServer() string {
if m != nil {
return m.Server
}
return ""
}
// The response message containing the ntp server, time, and offset
type TimeReply struct {
Response []*TimeResponse `protobuf:"bytes,1,rep,name=response,proto3" json:"response,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TimeReply) Reset() { *m = TimeReply{} }
func (m *TimeReply) String() string { return proto.CompactTextString(m) }
func (*TimeReply) ProtoMessage() {}
func (*TimeReply) Descriptor() ([]byte, []int) {
return fileDescriptor_e7ed1ef5b20ef4ce, []int{1}
}
func (m *TimeReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeReply.Unmarshal(m, b)
}
func (m *TimeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TimeReply.Marshal(b, m, deterministic)
}
func (m *TimeReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_TimeReply.Merge(m, src)
}
func (m *TimeReply) XXX_Size() int {
return xxx_messageInfo_TimeReply.Size(m)
}
func (m *TimeReply) XXX_DiscardUnknown() {
xxx_messageInfo_TimeReply.DiscardUnknown(m)
}
var xxx_messageInfo_TimeReply proto.InternalMessageInfo
func (m *TimeReply) GetResponse() []*TimeResponse {
if m != nil {
return m.Response
}
return nil
}
type TimeResponse struct {
Metadata *common.NodeMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
Server string `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"`
Localtime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=localtime,proto3" json:"localtime,omitempty"`
Remotetime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=remotetime,proto3" json:"remotetime,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TimeResponse) Reset() { *m = TimeResponse{} }
func (m *TimeResponse) String() string { return proto.CompactTextString(m) }
func (*TimeResponse) ProtoMessage() {}
func (*TimeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e7ed1ef5b20ef4ce, []int{2}
}
func (m *TimeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeResponse.Unmarshal(m, b)
}
func (m *TimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TimeResponse.Marshal(b, m, deterministic)
}
func (m *TimeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_TimeResponse.Merge(m, src)
}
func (m *TimeResponse) XXX_Size() int {
return xxx_messageInfo_TimeResponse.Size(m)
}
func (m *TimeResponse) XXX_DiscardUnknown() {
xxx_messageInfo_TimeResponse.DiscardUnknown(m)
}
var xxx_messageInfo_TimeResponse proto.InternalMessageInfo
func (m *TimeResponse) GetMetadata() *common.NodeMetadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *TimeResponse) GetServer() string {
if m != nil {
return m.Server
}
return ""
}
func (m *TimeResponse) GetLocaltime() *timestamp.Timestamp {
if m != nil {
return m.Localtime
}
return nil
}
func (m *TimeResponse) GetRemotetime() *timestamp.Timestamp {
if m != nil {
return m.Remotetime
}
return nil
}
func init() {
proto.RegisterType((*TimeRequest)(nil), "time.TimeRequest")
proto.RegisterType((*TimeReply)(nil), "time.TimeReply")
proto.RegisterType((*TimeResponse)(nil), "time.TimeResponse")
}
func init() { proto.RegisterFile("time/time.proto", fileDescriptor_e7ed1ef5b20ef4ce) }
var fileDescriptor_e7ed1ef5b20ef4ce = []byte{
// 332 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x4e, 0x32, 0x31,
0x14, 0x85, 0x33, 0x3f, 0x84, 0x1f, 0x2e, 0x24, 0xc4, 0x6a, 0x08, 0x19, 0x17, 0x12, 0x12, 0x23,
0x1b, 0xa7, 0x06, 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d2, 0x2c, 0x80, 0xc8, 0xbe, 0x41,
0xf8, 0x5a, 0x1e, 0x44, 0xfe, 0x63, 0x66, 0xd7, 0x00, 0x15, 0x2a, 0xb2, 0xe8, 0xa3, 0xcd, 0x3f,
0xa3, 0x91, 0x7b, 0xba, 0x82, 0xa6, 0x13, 0x18, 0xaf, 0xd7, 0xc1, 0x5e, 0xee, 0xde, 0xfd, 0x98,
0xb4, 0x1f, 0x63, 0x71, 0xe4, 0x78, 0xc0, 0x78, 0xb7, 0xc2, 0xe2, 0x8d, 0x1d, 0xc4, 0xaa, 0xc7,
0xbf, 0x17, 0x98, 0xcd, 0xa0, 0x57, 0x90, 0x0a, 0x53, 0xa1, 0xe5, 0xec, 0xbf, 0x93, 0x6e, 0xb5,
0x7c, 0x4a, 0x5e, 0xce, 0x96, 0xd2, 0xae, 0x36, 0x73, 0x07, 0x8e, 0x5b, 0x51, 0x92, 0x39, 0x37,
0x5b, 0x63, 0x51, 0x99, 0xb0, 0xe3, 0x42, 0x4b, 0x7f, 0x05, 0xe6, 0x2d, 0xdf, 0xea, 0xf2, 0x2b,
0x00, 0x00, 0xff, 0xff, 0xa7, 0x62, 0x03, 0x24, 0x55, 0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// TimeClient is the client API for Time service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TimeClient interface {
Time(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TimeReply, error)
TimeCheck(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeReply, error)
}
type timeClient struct {
cc *grpc.ClientConn
}
func NewTimeClient(cc *grpc.ClientConn) TimeClient {
return &timeClient{cc}
}
func (c *timeClient) Time(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TimeReply, error) {
out := new(TimeReply)
err := c.cc.Invoke(ctx, "/time.Time/Time", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *timeClient) TimeCheck(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeReply, error) {
out := new(TimeReply)
err := c.cc.Invoke(ctx, "/time.Time/TimeCheck", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TimeServer is the server API for Time service.
type TimeServer interface {
Time(context.Context, *empty.Empty) (*TimeReply, error)
TimeCheck(context.Context, *TimeRequest) (*TimeReply, error)
}
func RegisterTimeServer(s *grpc.Server, srv TimeServer) {
s.RegisterService(&_Time_serviceDesc, srv)
}
func _Time_Time_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TimeServer).Time(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/time.Time/Time",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TimeServer).Time(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Time_TimeCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TimeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TimeServer).TimeCheck(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/time.Time/TimeCheck",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TimeServer).TimeCheck(ctx, req.(*TimeRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Time_serviceDesc = grpc.ServiceDesc{
ServiceName: "time.Time",
HandlerType: (*TimeServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Time",
Handler: _Time_Time_Handler,
},
{
MethodName: "TimeCheck",
Handler: _Time_TimeCheck_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "time/time.proto",
}