localv1

package
v0.46.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package localv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	LocalService_Ping_FullMethodName        = "/rill.local.v1.LocalService/Ping"
	LocalService_GetMetadata_FullMethodName = "/rill.local.v1.LocalService/GetMetadata"
	LocalService_GetVersion_FullMethodName  = "/rill.local.v1.LocalService/GetVersion"
)

Variables

View Source
var File_rill_local_v1_api_proto protoreflect.FileDescriptor
View Source
var LocalService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rill.local.v1.LocalService",
	HandlerType: (*LocalServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _LocalService_Ping_Handler,
		},
		{
			MethodName: "GetMetadata",
			Handler:    _LocalService_GetMetadata_Handler,
		},
		{
			MethodName: "GetVersion",
			Handler:    _LocalService_GetVersion_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "rill/local/v1/api.proto",
}

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

Functions

func RegisterLocalServiceHandler

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

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

func RegisterLocalServiceHandlerClient

func RegisterLocalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LocalServiceClient) error

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

func RegisterLocalServiceHandlerFromEndpoint

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

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

func RegisterLocalServiceHandlerServer

func RegisterLocalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LocalServiceServer) error

RegisterLocalServiceHandlerServer registers the http handlers for service LocalService to "mux". UnaryRPC :call LocalServiceServer 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 RegisterLocalServiceHandlerFromEndpoint instead.

func RegisterLocalServiceServer

func RegisterLocalServiceServer(s grpc.ServiceRegistrar, srv LocalServiceServer)

Types

type GetMetadataRequest

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

func (*GetMetadataRequest) Descriptor deprecated

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

Deprecated: Use GetMetadataRequest.ProtoReflect.Descriptor instead.

func (*GetMetadataRequest) ProtoMessage

func (*GetMetadataRequest) ProtoMessage()

func (*GetMetadataRequest) ProtoReflect

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

func (*GetMetadataRequest) Reset

func (x *GetMetadataRequest) Reset()

func (*GetMetadataRequest) String

func (x *GetMetadataRequest) String() string

func (*GetMetadataRequest) Validate

func (m *GetMetadataRequest) Validate() error

Validate checks the field values on GetMetadataRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetMetadataRequest) ValidateAll

func (m *GetMetadataRequest) ValidateAll() error

ValidateAll checks the field values on GetMetadataRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetMetadataRequestMultiError, or nil if none found.

type GetMetadataRequestMultiError

type GetMetadataRequestMultiError []error

GetMetadataRequestMultiError is an error wrapping multiple validation errors returned by GetMetadataRequest.ValidateAll() if the designated constraints aren't met.

func (GetMetadataRequestMultiError) AllErrors

func (m GetMetadataRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetMetadataRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetMetadataRequestValidationError

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

GetMetadataRequestValidationError is the validation error returned by GetMetadataRequest.Validate if the designated constraints aren't met.

func (GetMetadataRequestValidationError) Cause

Cause function returns cause value.

func (GetMetadataRequestValidationError) Error

Error satisfies the builtin error interface

func (GetMetadataRequestValidationError) ErrorName

ErrorName returns error name.

func (GetMetadataRequestValidationError) Field

Field function returns field value.

func (GetMetadataRequestValidationError) Key

Key function returns key value.

func (GetMetadataRequestValidationError) Reason

Reason function returns reason value.

type GetMetadataResponse

type GetMetadataResponse struct {
	InstanceId       string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	ProjectPath      string `protobuf:"bytes,2,opt,name=project_path,json=projectPath,proto3" json:"project_path,omitempty"`
	InstallId        string `protobuf:"bytes,3,opt,name=install_id,json=installId,proto3" json:"install_id,omitempty"`
	UserId           string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Version          string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
	BuildCommit      string `protobuf:"bytes,6,opt,name=build_commit,json=buildCommit,proto3" json:"build_commit,omitempty"`
	BuildTime        string `protobuf:"bytes,7,opt,name=build_time,json=buildTime,proto3" json:"build_time,omitempty"`
	IsDev            bool   `protobuf:"varint,8,opt,name=is_dev,json=isDev,proto3" json:"is_dev,omitempty"`
	AnalyticsEnabled bool   `protobuf:"varint,9,opt,name=analytics_enabled,json=analyticsEnabled,proto3" json:"analytics_enabled,omitempty"`
	Readonly         bool   `protobuf:"varint,10,opt,name=readonly,proto3" json:"readonly,omitempty"`
	GrpcPort         int32  `protobuf:"varint,11,opt,name=grpc_port,json=grpcPort,proto3" json:"grpc_port,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMetadataResponse) Descriptor deprecated

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

Deprecated: Use GetMetadataResponse.ProtoReflect.Descriptor instead.

func (*GetMetadataResponse) GetAnalyticsEnabled

func (x *GetMetadataResponse) GetAnalyticsEnabled() bool

func (*GetMetadataResponse) GetBuildCommit

func (x *GetMetadataResponse) GetBuildCommit() string

func (*GetMetadataResponse) GetBuildTime

func (x *GetMetadataResponse) GetBuildTime() string

func (*GetMetadataResponse) GetGrpcPort

func (x *GetMetadataResponse) GetGrpcPort() int32

func (*GetMetadataResponse) GetInstallId

func (x *GetMetadataResponse) GetInstallId() string

func (*GetMetadataResponse) GetInstanceId

func (x *GetMetadataResponse) GetInstanceId() string

func (*GetMetadataResponse) GetIsDev

func (x *GetMetadataResponse) GetIsDev() bool

func (*GetMetadataResponse) GetProjectPath

func (x *GetMetadataResponse) GetProjectPath() string

func (*GetMetadataResponse) GetReadonly

func (x *GetMetadataResponse) GetReadonly() bool

func (*GetMetadataResponse) GetUserId

func (x *GetMetadataResponse) GetUserId() string

func (*GetMetadataResponse) GetVersion

func (x *GetMetadataResponse) GetVersion() string

func (*GetMetadataResponse) ProtoMessage

func (*GetMetadataResponse) ProtoMessage()

func (*GetMetadataResponse) ProtoReflect

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

func (*GetMetadataResponse) Reset

func (x *GetMetadataResponse) Reset()

func (*GetMetadataResponse) String

func (x *GetMetadataResponse) String() string

func (*GetMetadataResponse) Validate

func (m *GetMetadataResponse) Validate() error

Validate checks the field values on GetMetadataResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetMetadataResponse) ValidateAll

func (m *GetMetadataResponse) ValidateAll() error

ValidateAll checks the field values on GetMetadataResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetMetadataResponseMultiError, or nil if none found.

type GetMetadataResponseMultiError

type GetMetadataResponseMultiError []error

GetMetadataResponseMultiError is an error wrapping multiple validation errors returned by GetMetadataResponse.ValidateAll() if the designated constraints aren't met.

func (GetMetadataResponseMultiError) AllErrors

func (m GetMetadataResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetMetadataResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetMetadataResponseValidationError

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

GetMetadataResponseValidationError is the validation error returned by GetMetadataResponse.Validate if the designated constraints aren't met.

func (GetMetadataResponseValidationError) Cause

Cause function returns cause value.

func (GetMetadataResponseValidationError) Error

Error satisfies the builtin error interface

func (GetMetadataResponseValidationError) ErrorName

ErrorName returns error name.

func (GetMetadataResponseValidationError) Field

Field function returns field value.

func (GetMetadataResponseValidationError) Key

Key function returns key value.

func (GetMetadataResponseValidationError) Reason

Reason function returns reason value.

type GetVersionRequest

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

func (*GetVersionRequest) Descriptor deprecated

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

Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead.

func (*GetVersionRequest) ProtoMessage

func (*GetVersionRequest) ProtoMessage()

func (*GetVersionRequest) ProtoReflect

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

func (*GetVersionRequest) Reset

func (x *GetVersionRequest) Reset()

func (*GetVersionRequest) String

func (x *GetVersionRequest) String() string

func (*GetVersionRequest) Validate

func (m *GetVersionRequest) Validate() error

Validate checks the field values on GetVersionRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetVersionRequest) ValidateAll

func (m *GetVersionRequest) ValidateAll() error

ValidateAll checks the field values on GetVersionRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetVersionRequestMultiError, or nil if none found.

type GetVersionRequestMultiError

type GetVersionRequestMultiError []error

GetVersionRequestMultiError is an error wrapping multiple validation errors returned by GetVersionRequest.ValidateAll() if the designated constraints aren't met.

func (GetVersionRequestMultiError) AllErrors

func (m GetVersionRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetVersionRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetVersionRequestValidationError

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

GetVersionRequestValidationError is the validation error returned by GetVersionRequest.Validate if the designated constraints aren't met.

func (GetVersionRequestValidationError) Cause

Cause function returns cause value.

func (GetVersionRequestValidationError) Error

Error satisfies the builtin error interface

func (GetVersionRequestValidationError) ErrorName

ErrorName returns error name.

func (GetVersionRequestValidationError) Field

Field function returns field value.

func (GetVersionRequestValidationError) Key

Key function returns key value.

func (GetVersionRequestValidationError) Reason

Reason function returns reason value.

type GetVersionResponse

type GetVersionResponse struct {
	Current string `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"`
	Latest  string `protobuf:"bytes,2,opt,name=latest,proto3" json:"latest,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVersionResponse) Descriptor deprecated

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

Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead.

func (*GetVersionResponse) GetCurrent

func (x *GetVersionResponse) GetCurrent() string

func (*GetVersionResponse) GetLatest

func (x *GetVersionResponse) GetLatest() string

func (*GetVersionResponse) ProtoMessage

func (*GetVersionResponse) ProtoMessage()

func (*GetVersionResponse) ProtoReflect

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

func (*GetVersionResponse) Reset

func (x *GetVersionResponse) Reset()

func (*GetVersionResponse) String

func (x *GetVersionResponse) String() string

func (*GetVersionResponse) Validate

func (m *GetVersionResponse) Validate() error

Validate checks the field values on GetVersionResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetVersionResponse) ValidateAll

func (m *GetVersionResponse) ValidateAll() error

ValidateAll checks the field values on GetVersionResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetVersionResponseMultiError, or nil if none found.

type GetVersionResponseMultiError

type GetVersionResponseMultiError []error

GetVersionResponseMultiError is an error wrapping multiple validation errors returned by GetVersionResponse.ValidateAll() if the designated constraints aren't met.

func (GetVersionResponseMultiError) AllErrors

func (m GetVersionResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetVersionResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetVersionResponseValidationError

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

GetVersionResponseValidationError is the validation error returned by GetVersionResponse.Validate if the designated constraints aren't met.

func (GetVersionResponseValidationError) Cause

Cause function returns cause value.

func (GetVersionResponseValidationError) Error

Error satisfies the builtin error interface

func (GetVersionResponseValidationError) ErrorName

ErrorName returns error name.

func (GetVersionResponseValidationError) Field

Field function returns field value.

func (GetVersionResponseValidationError) Key

Key function returns key value.

func (GetVersionResponseValidationError) Reason

Reason function returns reason value.

type LocalServiceClient

type LocalServiceClient interface {
	// Ping returns the current time.
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	// GetMetadata returns information about the local Rill instance.
	GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error)
	// GetVersion returns details about the current and latest available Rill versions.
	GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error)
}

LocalServiceClient is the client API for LocalService 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.

type LocalServiceServer

type LocalServiceServer interface {
	// Ping returns the current time.
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	// GetMetadata returns information about the local Rill instance.
	GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error)
	// GetVersion returns details about the current and latest available Rill versions.
	GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error)
	// contains filtered or unexported methods
}

LocalServiceServer is the server API for LocalService service. All implementations must embed UnimplementedLocalServiceServer for forward compatibility

type PingRequest

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

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

func (*PingRequest) Validate

func (m *PingRequest) Validate() error

Validate checks the field values on PingRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PingRequest) ValidateAll

func (m *PingRequest) ValidateAll() error

ValidateAll checks the field values on PingRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PingRequestMultiError, or nil if none found.

type PingRequestMultiError

type PingRequestMultiError []error

PingRequestMultiError is an error wrapping multiple validation errors returned by PingRequest.ValidateAll() if the designated constraints aren't met.

func (PingRequestMultiError) AllErrors

func (m PingRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PingRequestMultiError) Error

func (m PingRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PingRequestValidationError

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

PingRequestValidationError is the validation error returned by PingRequest.Validate if the designated constraints aren't met.

func (PingRequestValidationError) Cause

Cause function returns cause value.

func (PingRequestValidationError) Error

Error satisfies the builtin error interface

func (PingRequestValidationError) ErrorName

func (e PingRequestValidationError) ErrorName() string

ErrorName returns error name.

func (PingRequestValidationError) Field

Field function returns field value.

func (PingRequestValidationError) Key

Key function returns key value.

func (PingRequestValidationError) Reason

Reason function returns reason value.

type PingResponse

type PingResponse struct {
	Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) GetTime

func (x *PingResponse) GetTime() *timestamppb.Timestamp

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

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

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

func (*PingResponse) Validate

func (m *PingResponse) Validate() error

Validate checks the field values on PingResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PingResponse) ValidateAll

func (m *PingResponse) ValidateAll() error

ValidateAll checks the field values on PingResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PingResponseMultiError, or nil if none found.

type PingResponseMultiError

type PingResponseMultiError []error

PingResponseMultiError is an error wrapping multiple validation errors returned by PingResponse.ValidateAll() if the designated constraints aren't met.

func (PingResponseMultiError) AllErrors

func (m PingResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PingResponseMultiError) Error

func (m PingResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PingResponseValidationError

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

PingResponseValidationError is the validation error returned by PingResponse.Validate if the designated constraints aren't met.

func (PingResponseValidationError) Cause

Cause function returns cause value.

func (PingResponseValidationError) Error

Error satisfies the builtin error interface

func (PingResponseValidationError) ErrorName

func (e PingResponseValidationError) ErrorName() string

ErrorName returns error name.

func (PingResponseValidationError) Field

Field function returns field value.

func (PingResponseValidationError) Key

Key function returns key value.

func (PingResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedLocalServiceServer

type UnimplementedLocalServiceServer struct {
}

UnimplementedLocalServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLocalServiceServer) GetMetadata

func (UnimplementedLocalServiceServer) GetVersion

func (UnimplementedLocalServiceServer) Ping

type UnsafeLocalServiceServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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