protos

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Overview

Package protos is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_profiles_proto protoreflect.FileDescriptor
View Source
var ProfilesService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "weave.works.profiles.v1.ProfilesService",
	HandlerType: (*ProfilesServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _ProfilesService_Get_Handler,
		},
		{
			MethodName: "GetWithVersion",
			Handler:    _ProfilesService_GetWithVersion_Handler,
		},
		{
			MethodName: "ProfilesGreaterThanVersion",
			Handler:    _ProfilesService_ProfilesGreaterThanVersion_Handler,
		},
		{
			MethodName: "Search",
			Handler:    _ProfilesService_Search_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "profiles.proto",
}

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

Functions

func RegisterProfilesServiceHandler

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

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

func RegisterProfilesServiceHandlerClient

func RegisterProfilesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfilesServiceClient) error

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

func RegisterProfilesServiceHandlerFromEndpoint

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

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

func RegisterProfilesServiceHandlerServer

func RegisterProfilesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfilesServiceServer) error

RegisterProfilesServiceHandlerServer registers the http handlers for service ProfilesService to "mux". UnaryRPC :call ProfilesServiceServer 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 RegisterProfilesServiceHandlerFromEndpoint instead.

func RegisterProfilesServiceServer

func RegisterProfilesServiceServer(s grpc.ServiceRegistrar, srv ProfilesServiceServer)

Types

type GRPCProfileCatalogEntry

type GRPCProfileCatalogEntry struct {
	Item profilesv1.ProfileCatalogEntry `json:"item"`
}

GRPCProfileCatalogEntry defines a return type for the grpc-gateway based catalog entry item.

type GRPCProfileCatalogEntryList

type GRPCProfileCatalogEntryList struct {
	Items []profilesv1.ProfileCatalogEntry `json:"items"`
}

GRPCProfileCatalogEntryList defines a return type for the grpc-gateway based catalog entry list.

type GetRequest

type GetRequest struct {

	// Name of the catalog
	SourceName string `protobuf:"bytes,1,opt,name=source_name,json=sourceName,proto3" json:"source_name,omitempty"`
	// Name of the profile
	ProfileName string `protobuf:"bytes,2,opt,name=profile_name,json=profileName,proto3" json:"profile_name,omitempty"`
	// contains filtered or unexported fields
}

GetRequest defines parameters for the Get endpoint.

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetProfileName

func (x *GetRequest) GetProfileName() string

func (*GetRequest) GetSourceName

func (x *GetRequest) GetSourceName() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Item *ProfileCatalogEntry `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

GetResponse defines response parameters for Get endpoint.

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetItem

func (x *GetResponse) GetItem() *ProfileCatalogEntry

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type GetWithVersionRequest

type GetWithVersionRequest struct {

	// Name of the catalog
	SourceName string `protobuf:"bytes,1,opt,name=source_name,json=sourceName,proto3" json:"source_name,omitempty"`
	// Name of the profile
	ProfileName string `protobuf:"bytes,2,opt,name=profile_name,json=profileName,proto3" json:"profile_name,omitempty"`
	// Version of the profile
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

GetWithVersionRequest defines request parameters for GetWithVersion endpoint.

func (*GetWithVersionRequest) Descriptor deprecated

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

Deprecated: Use GetWithVersionRequest.ProtoReflect.Descriptor instead.

func (*GetWithVersionRequest) GetProfileName

func (x *GetWithVersionRequest) GetProfileName() string

func (*GetWithVersionRequest) GetSourceName

func (x *GetWithVersionRequest) GetSourceName() string

func (*GetWithVersionRequest) GetVersion

func (x *GetWithVersionRequest) GetVersion() string

func (*GetWithVersionRequest) ProtoMessage

func (*GetWithVersionRequest) ProtoMessage()

func (*GetWithVersionRequest) ProtoReflect

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

func (*GetWithVersionRequest) Reset

func (x *GetWithVersionRequest) Reset()

func (*GetWithVersionRequest) String

func (x *GetWithVersionRequest) String() string

type GetWithVersionResponse

type GetWithVersionResponse struct {
	Item *ProfileCatalogEntry `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

GetWithVersionResponse defines response parameters for GetWithVersion endpoint.

func (*GetWithVersionResponse) Descriptor deprecated

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

Deprecated: Use GetWithVersionResponse.ProtoReflect.Descriptor instead.

func (*GetWithVersionResponse) GetItem

func (*GetWithVersionResponse) ProtoMessage

func (*GetWithVersionResponse) ProtoMessage()

func (*GetWithVersionResponse) ProtoReflect

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

func (*GetWithVersionResponse) Reset

func (x *GetWithVersionResponse) Reset()

func (*GetWithVersionResponse) String

func (x *GetWithVersionResponse) String() string

type ProfileCatalogEntry

type ProfileCatalogEntry struct {

	// Defines the branch or tag to use
	Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	// Name of the catalog the profile is listed in
	CatalogSource string `protobuf:"bytes,2,opt,name=catalog_source,json=catalogSource,proto3" json:"catalog_source,omitempty"`
	// The full URL path to the profile.yaml
	Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	// The fields below are inlined from ProfileDescription.
	// Name of the profile
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// Description of the profile
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// The maintainer of the profile
	Maintainer string `protobuf:"bytes,6,opt,name=maintainer,proto3" json:"maintainer,omitempty"`
	// Any prerequisites that should be met for this profile to be installable
	Prerequisites []string `protobuf:"bytes,7,rep,name=prerequisites,proto3" json:"prerequisites,omitempty"`
	// contains filtered or unexported fields
}

ProfileDescription defines details about a given profile.

func TransformCatalogEntry

func TransformCatalogEntry(origin *profilesv1.ProfileCatalogEntry) *ProfileCatalogEntry

TransformCatalogEntry takes a profilesv1 catalog entry and creates a proto catalog entry out of it.

func TransformCatalogEntryList

func TransformCatalogEntryList(origins []profilesv1.ProfileCatalogEntry) []*ProfileCatalogEntry

TransformCatalogEntryList takes a slice of profilesv1 catalog entries and creates a proto catalog entry slice out of it.

func (*ProfileCatalogEntry) Descriptor deprecated

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

Deprecated: Use ProfileCatalogEntry.ProtoReflect.Descriptor instead.

func (*ProfileCatalogEntry) GetCatalogSource

func (x *ProfileCatalogEntry) GetCatalogSource() string

func (*ProfileCatalogEntry) GetDescription

func (x *ProfileCatalogEntry) GetDescription() string

func (*ProfileCatalogEntry) GetMaintainer

func (x *ProfileCatalogEntry) GetMaintainer() string

func (*ProfileCatalogEntry) GetName

func (x *ProfileCatalogEntry) GetName() string

func (*ProfileCatalogEntry) GetPrerequisites

func (x *ProfileCatalogEntry) GetPrerequisites() []string

func (*ProfileCatalogEntry) GetTag

func (x *ProfileCatalogEntry) GetTag() string

func (*ProfileCatalogEntry) GetUrl

func (x *ProfileCatalogEntry) GetUrl() string

func (*ProfileCatalogEntry) ProtoMessage

func (*ProfileCatalogEntry) ProtoMessage()

func (*ProfileCatalogEntry) ProtoReflect

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

func (*ProfileCatalogEntry) Reset

func (x *ProfileCatalogEntry) Reset()

func (*ProfileCatalogEntry) String

func (x *ProfileCatalogEntry) String() string

type ProfilesGreaterThanVersionRequest

type ProfilesGreaterThanVersionRequest struct {

	// Name of the catalog
	SourceName string `protobuf:"bytes,1,opt,name=source_name,json=sourceName,proto3" json:"source_name,omitempty"`
	// Name of the profile
	ProfileName string `protobuf:"bytes,2,opt,name=profile_name,json=profileName,proto3" json:"profile_name,omitempty"`
	// Version of the profile
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

ProfilesGreaterThanVersionRequest defines request parameters for ProfilesGreaterThanVersion endpoint.

func (*ProfilesGreaterThanVersionRequest) Descriptor deprecated

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

Deprecated: Use ProfilesGreaterThanVersionRequest.ProtoReflect.Descriptor instead.

func (*ProfilesGreaterThanVersionRequest) GetProfileName

func (x *ProfilesGreaterThanVersionRequest) GetProfileName() string

func (*ProfilesGreaterThanVersionRequest) GetSourceName

func (x *ProfilesGreaterThanVersionRequest) GetSourceName() string

func (*ProfilesGreaterThanVersionRequest) GetVersion

func (x *ProfilesGreaterThanVersionRequest) GetVersion() string

func (*ProfilesGreaterThanVersionRequest) ProtoMessage

func (*ProfilesGreaterThanVersionRequest) ProtoMessage()

func (*ProfilesGreaterThanVersionRequest) ProtoReflect

func (*ProfilesGreaterThanVersionRequest) Reset

func (*ProfilesGreaterThanVersionRequest) String

type ProfilesGreaterThanVersionResponse

type ProfilesGreaterThanVersionResponse struct {
	Items []*ProfileCatalogEntry `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

ProfilesGreaterThanVersionResponse defines response parameters for ProfilesGreaterThanVersion endpoint.

func (*ProfilesGreaterThanVersionResponse) Descriptor deprecated

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

Deprecated: Use ProfilesGreaterThanVersionResponse.ProtoReflect.Descriptor instead.

func (*ProfilesGreaterThanVersionResponse) GetItems

func (*ProfilesGreaterThanVersionResponse) ProtoMessage

func (*ProfilesGreaterThanVersionResponse) ProtoMessage()

func (*ProfilesGreaterThanVersionResponse) ProtoReflect

func (*ProfilesGreaterThanVersionResponse) Reset

func (*ProfilesGreaterThanVersionResponse) String

type ProfilesServiceClient

type ProfilesServiceClient interface {
	// Get will return a specific profile from the catalog
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	// GetWithVersion will return a specific profile from the catalog
	GetWithVersion(ctx context.Context, in *GetWithVersionRequest, opts ...grpc.CallOption) (*GetWithVersionResponse, error)
	// ProfilesGreaterThanVersion returns all profiles which are of a greater version for a given profile with a version.
	ProfilesGreaterThanVersion(ctx context.Context, in *ProfilesGreaterThanVersionRequest, opts ...grpc.CallOption) (*ProfilesGreaterThanVersionResponse, error)
	// Search will return a list of profiles which match query
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
}

ProfilesServiceClient is the client API for ProfilesService 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 ProfilesServiceServer

type ProfilesServiceServer interface {
	// Get will return a specific profile from the catalog
	Get(context.Context, *GetRequest) (*GetResponse, error)
	// GetWithVersion will return a specific profile from the catalog
	GetWithVersion(context.Context, *GetWithVersionRequest) (*GetWithVersionResponse, error)
	// ProfilesGreaterThanVersion returns all profiles which are of a greater version for a given profile with a version.
	ProfilesGreaterThanVersion(context.Context, *ProfilesGreaterThanVersionRequest) (*ProfilesGreaterThanVersionResponse, error)
	// Search will return a list of profiles which match query
	Search(context.Context, *SearchRequest) (*SearchResponse, error)
}

ProfilesServiceServer is the server API for ProfilesService service. All implementations should embed UnimplementedProfilesServiceServer for forward compatibility

type SearchRequest

type SearchRequest struct {

	// Defines a name to search for that is included in a profile's name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

SearchRequest defines request parameters for Search endpoint.

func (*SearchRequest) Descriptor deprecated

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

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetName

func (x *SearchRequest) GetName() string

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

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

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

type SearchResponse

type SearchResponse struct {
	Items []*ProfileCatalogEntry `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

SearchResponse defines response parameters for Search endpoint.

func (*SearchResponse) Descriptor deprecated

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

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetItems

func (x *SearchResponse) GetItems() []*ProfileCatalogEntry

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) ProtoReflect

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

func (*SearchResponse) Reset

func (x *SearchResponse) Reset()

func (*SearchResponse) String

func (x *SearchResponse) String() string

type UnimplementedProfilesServiceServer

type UnimplementedProfilesServiceServer struct {
}

UnimplementedProfilesServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedProfilesServiceServer) Get

func (UnimplementedProfilesServiceServer) GetWithVersion

func (UnimplementedProfilesServiceServer) Search

type UnsafeProfilesServiceServer

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

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

Jump to

Keyboard shortcuts

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