vhost

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package vhost contains data-types for managing virtual hosting.

Index

Constants

This section is empty.

Variables

View Source
var File_vhost_proto protoreflect.FileDescriptor

Functions

func RegisterVHostsServer

func RegisterVHostsServer(s grpc.ServiceRegistrar, srv VHostsServer)

func WithVHost

func WithVHost(ctx context.Context, vhost *VHost) context.Context

WithVHost associates the virtual host with a context.

Types

type EnsureRequest

type EnsureRequest struct {
	Vhost  *VHost `protobuf:"bytes,1,opt,name=vhost,proto3" json:"vhost,omitempty"`
	Delete bool   `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"`
	// contains filtered or unexported fields
}

func (*EnsureRequest) Descriptor deprecated

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

Deprecated: Use EnsureRequest.ProtoReflect.Descriptor instead.

func (*EnsureRequest) GetDelete

func (x *EnsureRequest) GetDelete() bool

func (*EnsureRequest) GetVhost

func (x *EnsureRequest) GetVhost() *VHost

func (*EnsureRequest) ProtoMessage

func (*EnsureRequest) ProtoMessage()

func (*EnsureRequest) ProtoReflect

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

func (*EnsureRequest) Reset

func (x *EnsureRequest) Reset()

func (*EnsureRequest) String

func (x *EnsureRequest) String() string

type UnimplementedVHostsServer

type UnimplementedVHostsServer struct {
}

UnimplementedVHostsServer must be embedded to have forward compatible implementations.

func (UnimplementedVHostsServer) Ensure

func (UnimplementedVHostsServer) List

type UnsafeVHostsServer

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

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

type VHost

type VHost struct {
	Vhost    string     `protobuf:"bytes,1,opt,name=vhost,proto3" json:"vhost,omitempty"`
	TenantId *tenant.ID `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	// contains filtered or unexported fields
}

func FromContext

func FromContext(ctx context.Context) *VHost

FromContext returns the VHost associated with the context, or nil.

func (*VHost) Descriptor deprecated

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

Deprecated: Use VHost.ProtoReflect.Descriptor instead.

func (*VHost) GetTenantId

func (x *VHost) GetTenantId() *tenant.ID

func (*VHost) GetVhost

func (x *VHost) GetVhost() string

func (*VHost) ProtoMessage

func (*VHost) ProtoMessage()

func (*VHost) ProtoReflect

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

func (*VHost) Reset

func (x *VHost) Reset()

func (*VHost) String

func (x *VHost) String() string

type VHostsClient

type VHostsClient interface {
	Ensure(ctx context.Context, in *EnsureRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (VHosts_ListClient, error)
}

VHostsClient is the client API for VHosts 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 NewVHostsClient

func NewVHostsClient(cc grpc.ClientConnInterface) VHostsClient

type VHostsServer

type VHostsServer interface {
	Ensure(context.Context, *EnsureRequest) (*emptypb.Empty, error)
	List(*emptypb.Empty, VHosts_ListServer) error
	// contains filtered or unexported methods
}

VHostsServer is the server API for VHosts service. All implementations must embed UnimplementedVHostsServer for forward compatibility

type VHosts_ListClient

type VHosts_ListClient interface {
	Recv() (*VHost, error)
	grpc.ClientStream
}

type VHosts_ListServer

type VHosts_ListServer interface {
	Send(*VHost) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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