info

package
v0.8.47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 17 Imported by: 4

Documentation

Overview

Package info is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_aserto_common_info_v1_info_proto protoreflect.FileDescriptor
View Source
var Info_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aserto.common.info.v1.Info",
	HandlerType: (*InfoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Info",
			Handler:    _Info_Info_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "aserto/common/info/v1/info.proto",
}

Info_ServiceDesc is the grpc.ServiceDesc for Info service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterInfoHandler

func RegisterInfoHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterInfoHandler registers the http handlers for service Info to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterInfoHandlerClient

func RegisterInfoHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InfoClient) error

RegisterInfoHandlerClient registers the http handlers for service Info to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InfoClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InfoClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InfoClient" to call the correct interceptors.

func RegisterInfoHandlerFromEndpoint

func RegisterInfoHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterInfoHandlerFromEndpoint is same as RegisterInfoHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterInfoHandlerServer

func RegisterInfoHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfoServer) error

RegisterInfoHandlerServer registers the http handlers for service Info to "mux". UnaryRPC :call InfoServer 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 RegisterInfoHandlerFromEndpoint instead.

func RegisterInfoServer

func RegisterInfoServer(s grpc.ServiceRegistrar, srv InfoServer)

Types

type BuildInfo

type BuildInfo struct {
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Commit  string `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
	Date    string `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"`
	Os      string `protobuf:"bytes,4,opt,name=os,proto3" json:"os,omitempty"`
	Arch    string `protobuf:"bytes,5,opt,name=arch,proto3" json:"arch,omitempty"`
	// contains filtered or unexported fields
}

func (*BuildInfo) Descriptor deprecated

func (*BuildInfo) Descriptor() ([]byte, []int)

Deprecated: Use BuildInfo.ProtoReflect.Descriptor instead.

func (*BuildInfo) GetArch

func (x *BuildInfo) GetArch() string

func (*BuildInfo) GetCommit

func (x *BuildInfo) GetCommit() string

func (*BuildInfo) GetDate

func (x *BuildInfo) GetDate() string

func (*BuildInfo) GetOs

func (x *BuildInfo) GetOs() string

func (*BuildInfo) GetVersion

func (x *BuildInfo) GetVersion() string

func (*BuildInfo) ProtoMessage

func (*BuildInfo) ProtoMessage()

func (*BuildInfo) ProtoReflect

func (x *BuildInfo) ProtoReflect() protoreflect.Message

func (*BuildInfo) Reset

func (x *BuildInfo) Reset()

func (*BuildInfo) String

func (x *BuildInfo) String() string

type InfoClient

type InfoClient interface {
	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
}

InfoClient is the client API for Info 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 NewInfoClient

func NewInfoClient(cc grpc.ClientConnInterface) InfoClient

type InfoRequest

type InfoRequest struct {
	// contains filtered or unexported fields
}

func (*InfoRequest) Descriptor deprecated

func (*InfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) ProtoReflect

func (x *InfoRequest) ProtoReflect() protoreflect.Message

func (*InfoRequest) Reset

func (x *InfoRequest) Reset()

func (*InfoRequest) String

func (x *InfoRequest) String() string

type InfoResponse

type InfoResponse struct {
	System  *SystemInfo  `protobuf:"bytes,1,opt,name=system,proto3" json:"system,omitempty"`
	Version *VersionInfo `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Build   *BuildInfo   `protobuf:"bytes,3,opt,name=build,proto3" json:"build,omitempty"`
	// contains filtered or unexported fields
}

func (*InfoResponse) Descriptor deprecated

func (*InfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.

func (*InfoResponse) GetBuild

func (x *InfoResponse) GetBuild() *BuildInfo

func (*InfoResponse) GetSystem

func (x *InfoResponse) GetSystem() *SystemInfo

func (*InfoResponse) GetVersion

func (x *InfoResponse) GetVersion() *VersionInfo

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) ProtoReflect

func (x *InfoResponse) ProtoReflect() protoreflect.Message

func (*InfoResponse) Reset

func (x *InfoResponse) Reset()

func (*InfoResponse) String

func (x *InfoResponse) String() string

type InfoServer

type InfoServer interface {
	Info(context.Context, *InfoRequest) (*InfoResponse, error)
}

InfoServer is the server API for Info service. All implementations should embed UnimplementedInfoServer for forward compatibility

type SystemInfo

type SystemInfo struct {
	InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	CreatedAt  string `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*SystemInfo) Descriptor deprecated

func (*SystemInfo) Descriptor() ([]byte, []int)

Deprecated: Use SystemInfo.ProtoReflect.Descriptor instead.

func (*SystemInfo) GetCreatedAt

func (x *SystemInfo) GetCreatedAt() string

func (*SystemInfo) GetInstanceId

func (x *SystemInfo) GetInstanceId() string

func (*SystemInfo) ProtoMessage

func (*SystemInfo) ProtoMessage()

func (*SystemInfo) ProtoReflect

func (x *SystemInfo) ProtoReflect() protoreflect.Message

func (*SystemInfo) Reset

func (x *SystemInfo) Reset()

func (*SystemInfo) String

func (x *SystemInfo) String() string

type UnimplementedInfoServer

type UnimplementedInfoServer struct {
}

UnimplementedInfoServer should be embedded to have forward compatible implementations.

func (UnimplementedInfoServer) Info

type UnsafeInfoServer

type UnsafeInfoServer interface {
	// contains filtered or unexported methods
}

UnsafeInfoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InfoServer will result in compilation errors.

type VersionInfo

type VersionInfo struct {
	System int32  `protobuf:"varint,2,opt,name=system,proto3" json:"system,omitempty"`
	Schema string `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
	// contains filtered or unexported fields
}

func (*VersionInfo) Descriptor deprecated

func (*VersionInfo) Descriptor() ([]byte, []int)

Deprecated: Use VersionInfo.ProtoReflect.Descriptor instead.

func (*VersionInfo) GetSchema

func (x *VersionInfo) GetSchema() string

func (*VersionInfo) GetSystem

func (x *VersionInfo) GetSystem() int32

func (*VersionInfo) ProtoMessage

func (*VersionInfo) ProtoMessage()

func (*VersionInfo) ProtoReflect

func (x *VersionInfo) ProtoReflect() protoreflect.Message

func (*VersionInfo) Reset

func (x *VersionInfo) Reset()

func (*VersionInfo) String

func (x *VersionInfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL