v1

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_vince_sites_v1_sites_proto protoreflect.FileDescriptor
View Source
var Sites_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.Sites",
	HandlerType: (*SitesServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSite",
			Handler:    _Sites_CreateSite_Handler,
		},
		{
			MethodName: "GetSite",
			Handler:    _Sites_GetSite_Handler,
		},
		{
			MethodName: "ListSites",
			Handler:    _Sites_ListSites_Handler,
		},
		{
			MethodName: "DeleteSite",
			Handler:    _Sites_DeleteSite_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "vince/sites/v1/sites.proto",
}

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

Functions

func RegisterSitesHandler

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

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

func RegisterSitesHandlerClient

func RegisterSitesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SitesClient) error

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

func RegisterSitesHandlerFromEndpoint

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

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

func RegisterSitesHandlerServer

func RegisterSitesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SitesServer) error

RegisterSitesHandlerServer registers the http handlers for service Sites to "mux". UnaryRPC :call SitesServer 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 RegisterSitesHandlerFromEndpoint instead.

func RegisterSitesServer

func RegisterSitesServer(s grpc.ServiceRegistrar, srv SitesServer)

Types

type CreateSiteRequest

type CreateSiteRequest struct {
	Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSiteRequest) Descriptor deprecated

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

Deprecated: Use CreateSiteRequest.ProtoReflect.Descriptor instead.

func (*CreateSiteRequest) GetDomain

func (x *CreateSiteRequest) GetDomain() string

func (*CreateSiteRequest) MarshalToSizedBufferVT

func (m *CreateSiteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CreateSiteRequest) MarshalToVT

func (m *CreateSiteRequest) MarshalToVT(dAtA []byte) (int, error)

func (*CreateSiteRequest) MarshalVT

func (m *CreateSiteRequest) MarshalVT() (dAtA []byte, err error)

func (*CreateSiteRequest) ProtoMessage

func (*CreateSiteRequest) ProtoMessage()

func (*CreateSiteRequest) ProtoReflect

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

func (*CreateSiteRequest) Reset

func (x *CreateSiteRequest) Reset()

func (*CreateSiteRequest) SizeVT

func (m *CreateSiteRequest) SizeVT() (n int)

func (*CreateSiteRequest) String

func (x *CreateSiteRequest) String() string

func (*CreateSiteRequest) UnmarshalVT

func (m *CreateSiteRequest) UnmarshalVT(dAtA []byte) error

type CreateSiteResponse

type CreateSiteResponse struct {
	Site *Site `protobuf:"bytes,1,opt,name=site,proto3" json:"site,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSiteResponse) Descriptor deprecated

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

Deprecated: Use CreateSiteResponse.ProtoReflect.Descriptor instead.

func (*CreateSiteResponse) GetSite

func (x *CreateSiteResponse) GetSite() *Site

func (*CreateSiteResponse) MarshalToSizedBufferVT

func (m *CreateSiteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CreateSiteResponse) MarshalToVT

func (m *CreateSiteResponse) MarshalToVT(dAtA []byte) (int, error)

func (*CreateSiteResponse) MarshalVT

func (m *CreateSiteResponse) MarshalVT() (dAtA []byte, err error)

func (*CreateSiteResponse) ProtoMessage

func (*CreateSiteResponse) ProtoMessage()

func (*CreateSiteResponse) ProtoReflect

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

func (*CreateSiteResponse) Reset

func (x *CreateSiteResponse) Reset()

func (*CreateSiteResponse) SizeVT

func (m *CreateSiteResponse) SizeVT() (n int)

func (*CreateSiteResponse) String

func (x *CreateSiteResponse) String() string

func (*CreateSiteResponse) UnmarshalVT

func (m *CreateSiteResponse) UnmarshalVT(dAtA []byte) error

type DeleteSiteRequest

type DeleteSiteRequest struct {
	Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteSiteRequest) Descriptor deprecated

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

Deprecated: Use DeleteSiteRequest.ProtoReflect.Descriptor instead.

func (*DeleteSiteRequest) GetDomain

func (x *DeleteSiteRequest) GetDomain() string

func (*DeleteSiteRequest) MarshalToSizedBufferVT

func (m *DeleteSiteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*DeleteSiteRequest) MarshalToVT

func (m *DeleteSiteRequest) MarshalToVT(dAtA []byte) (int, error)

func (*DeleteSiteRequest) MarshalVT

func (m *DeleteSiteRequest) MarshalVT() (dAtA []byte, err error)

func (*DeleteSiteRequest) ProtoMessage

func (*DeleteSiteRequest) ProtoMessage()

func (*DeleteSiteRequest) ProtoReflect

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

func (*DeleteSiteRequest) Reset

func (x *DeleteSiteRequest) Reset()

func (*DeleteSiteRequest) SizeVT

func (m *DeleteSiteRequest) SizeVT() (n int)

func (*DeleteSiteRequest) String

func (x *DeleteSiteRequest) String() string

func (*DeleteSiteRequest) UnmarshalVT

func (m *DeleteSiteRequest) UnmarshalVT(dAtA []byte) error

type DeleteSiteResponse

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

func (*DeleteSiteResponse) Descriptor deprecated

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

Deprecated: Use DeleteSiteResponse.ProtoReflect.Descriptor instead.

func (*DeleteSiteResponse) MarshalToSizedBufferVT

func (m *DeleteSiteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*DeleteSiteResponse) MarshalToVT

func (m *DeleteSiteResponse) MarshalToVT(dAtA []byte) (int, error)

func (*DeleteSiteResponse) MarshalVT

func (m *DeleteSiteResponse) MarshalVT() (dAtA []byte, err error)

func (*DeleteSiteResponse) ProtoMessage

func (*DeleteSiteResponse) ProtoMessage()

func (*DeleteSiteResponse) ProtoReflect

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

func (*DeleteSiteResponse) Reset

func (x *DeleteSiteResponse) Reset()

func (*DeleteSiteResponse) SizeVT

func (m *DeleteSiteResponse) SizeVT() (n int)

func (*DeleteSiteResponse) String

func (x *DeleteSiteResponse) String() string

func (*DeleteSiteResponse) UnmarshalVT

func (m *DeleteSiteResponse) UnmarshalVT(dAtA []byte) error

type GetSiteRequest

type GetSiteRequest struct {
	Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSiteRequest) Descriptor deprecated

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

Deprecated: Use GetSiteRequest.ProtoReflect.Descriptor instead.

func (*GetSiteRequest) GetDomain

func (x *GetSiteRequest) GetDomain() string

func (*GetSiteRequest) MarshalToSizedBufferVT

func (m *GetSiteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*GetSiteRequest) MarshalToVT

func (m *GetSiteRequest) MarshalToVT(dAtA []byte) (int, error)

func (*GetSiteRequest) MarshalVT

func (m *GetSiteRequest) MarshalVT() (dAtA []byte, err error)

func (*GetSiteRequest) ProtoMessage

func (*GetSiteRequest) ProtoMessage()

func (*GetSiteRequest) ProtoReflect

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

func (*GetSiteRequest) Reset

func (x *GetSiteRequest) Reset()

func (*GetSiteRequest) SizeVT

func (m *GetSiteRequest) SizeVT() (n int)

func (*GetSiteRequest) String

func (x *GetSiteRequest) String() string

func (*GetSiteRequest) UnmarshalVT

func (m *GetSiteRequest) UnmarshalVT(dAtA []byte) error

type ListSitesRequest

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

func (*ListSitesRequest) Descriptor deprecated

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

Deprecated: Use ListSitesRequest.ProtoReflect.Descriptor instead.

func (*ListSitesRequest) MarshalToSizedBufferVT

func (m *ListSitesRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ListSitesRequest) MarshalToVT

func (m *ListSitesRequest) MarshalToVT(dAtA []byte) (int, error)

func (*ListSitesRequest) MarshalVT

func (m *ListSitesRequest) MarshalVT() (dAtA []byte, err error)

func (*ListSitesRequest) ProtoMessage

func (*ListSitesRequest) ProtoMessage()

func (*ListSitesRequest) ProtoReflect

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

func (*ListSitesRequest) Reset

func (x *ListSitesRequest) Reset()

func (*ListSitesRequest) SizeVT

func (m *ListSitesRequest) SizeVT() (n int)

func (*ListSitesRequest) String

func (x *ListSitesRequest) String() string

func (*ListSitesRequest) UnmarshalVT

func (m *ListSitesRequest) UnmarshalVT(dAtA []byte) error

type ListSitesResponse

type ListSitesResponse struct {
	List []*Site `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSitesResponse) Descriptor deprecated

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

Deprecated: Use ListSitesResponse.ProtoReflect.Descriptor instead.

func (*ListSitesResponse) GetList

func (x *ListSitesResponse) GetList() []*Site

func (*ListSitesResponse) MarshalToSizedBufferVT

func (m *ListSitesResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ListSitesResponse) MarshalToVT

func (m *ListSitesResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ListSitesResponse) MarshalVT

func (m *ListSitesResponse) MarshalVT() (dAtA []byte, err error)

func (*ListSitesResponse) ProtoMessage

func (*ListSitesResponse) ProtoMessage()

func (*ListSitesResponse) ProtoReflect

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

func (*ListSitesResponse) Reset

func (x *ListSitesResponse) Reset()

func (*ListSitesResponse) SizeVT

func (m *ListSitesResponse) SizeVT() (n int)

func (*ListSitesResponse) String

func (x *ListSitesResponse) String() string

func (*ListSitesResponse) UnmarshalVT

func (m *ListSitesResponse) UnmarshalVT(dAtA []byte) error

type Site

type Site struct {
	Domain string              `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
	Goals  map[string]*v1.Goal `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Site) Descriptor deprecated

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

Deprecated: Use Site.ProtoReflect.Descriptor instead.

func (*Site) GetDomain

func (x *Site) GetDomain() string

func (*Site) GetGoals

func (x *Site) GetGoals() map[string]*v1.Goal

func (*Site) MarshalToSizedBufferVT

func (m *Site) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Site) MarshalToVT

func (m *Site) MarshalToVT(dAtA []byte) (int, error)

func (*Site) MarshalVT

func (m *Site) MarshalVT() (dAtA []byte, err error)

func (*Site) ProtoMessage

func (*Site) ProtoMessage()

func (*Site) ProtoReflect

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

func (*Site) Reset

func (x *Site) Reset()

func (*Site) SizeVT

func (m *Site) SizeVT() (n int)

func (*Site) String

func (x *Site) String() string

func (*Site) UnmarshalVT

func (m *Site) UnmarshalVT(dAtA []byte) error

type SitesClient

type SitesClient interface {
	CreateSite(ctx context.Context, in *CreateSiteRequest, opts ...grpc.CallOption) (*CreateSiteResponse, error)
	GetSite(ctx context.Context, in *GetSiteRequest, opts ...grpc.CallOption) (*Site, error)
	ListSites(ctx context.Context, in *ListSitesRequest, opts ...grpc.CallOption) (*ListSitesResponse, error)
	DeleteSite(ctx context.Context, in *DeleteSiteRequest, opts ...grpc.CallOption) (*DeleteSiteResponse, error)
}

SitesClient is the client API for Sites 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 NewSitesClient

func NewSitesClient(cc grpc.ClientConnInterface) SitesClient

type SitesServer

type SitesServer interface {
	CreateSite(context.Context, *CreateSiteRequest) (*CreateSiteResponse, error)
	GetSite(context.Context, *GetSiteRequest) (*Site, error)
	ListSites(context.Context, *ListSitesRequest) (*ListSitesResponse, error)
	DeleteSite(context.Context, *DeleteSiteRequest) (*DeleteSiteResponse, error)
	// contains filtered or unexported methods
}

SitesServer is the server API for Sites service. All implementations must embed UnimplementedSitesServer for forward compatibility

type UnimplementedSitesServer

type UnimplementedSitesServer struct {
}

UnimplementedSitesServer must be embedded to have forward compatible implementations.

func (UnimplementedSitesServer) CreateSite

func (UnimplementedSitesServer) DeleteSite

func (UnimplementedSitesServer) GetSite

func (UnimplementedSitesServer) ListSites

type UnsafeSitesServer

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

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

Jump to

Keyboard shortcuts

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