ocp_presentation_api

package module
v0.0.0-...-ea515cf Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package ocp_presentation_api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_api_ocp_presentation_api_ocp_presentation_api_proto protoreflect.FileDescriptor
View Source
var PresentationAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ocp.presentation.api.PresentationAPI",
	HandlerType: (*PresentationAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreatePresentationV1",
			Handler:    _PresentationAPI_CreatePresentationV1_Handler,
		},
		{
			MethodName: "DescribePresentationV1",
			Handler:    _PresentationAPI_DescribePresentationV1_Handler,
		},
		{
			MethodName: "ListPresentationsV1",
			Handler:    _PresentationAPI_ListPresentationsV1_Handler,
		},
		{
			MethodName: "RemovePresentationV1",
			Handler:    _PresentationAPI_RemovePresentationV1_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/ocp-presentation-api/ocp-presentation-api.proto",
}

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

Functions

func RegisterPresentationAPIHandler

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

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

func RegisterPresentationAPIHandlerClient

func RegisterPresentationAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PresentationAPIClient) error

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

func RegisterPresentationAPIHandlerFromEndpoint

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

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

func RegisterPresentationAPIHandlerServer

func RegisterPresentationAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PresentationAPIServer) error

RegisterPresentationAPIHandlerServer registers the http handlers for service PresentationAPI to "mux". UnaryRPC :call PresentationAPIServer 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 RegisterPresentationAPIHandlerFromEndpoint instead.

func RegisterPresentationAPIServer

func RegisterPresentationAPIServer(s grpc.ServiceRegistrar, srv PresentationAPIServer)

Types

type CreatePresentationV1Request

type CreatePresentationV1Request struct {
	UserId      uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	LessonId    uint64 `protobuf:"varint,2,opt,name=lesson_id,json=lessonId,proto3" json:"lesson_id,omitempty"`
	Name        string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePresentationV1Request) Descriptor deprecated

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

Deprecated: Use CreatePresentationV1Request.ProtoReflect.Descriptor instead.

func (*CreatePresentationV1Request) GetDescription

func (x *CreatePresentationV1Request) GetDescription() string

func (*CreatePresentationV1Request) GetLessonId

func (x *CreatePresentationV1Request) GetLessonId() uint64

func (*CreatePresentationV1Request) GetName

func (x *CreatePresentationV1Request) GetName() string

func (*CreatePresentationV1Request) GetUserId

func (x *CreatePresentationV1Request) GetUserId() uint64

func (*CreatePresentationV1Request) ProtoMessage

func (*CreatePresentationV1Request) ProtoMessage()

func (*CreatePresentationV1Request) ProtoReflect

func (*CreatePresentationV1Request) Reset

func (x *CreatePresentationV1Request) Reset()

func (*CreatePresentationV1Request) String

func (x *CreatePresentationV1Request) String() string

func (*CreatePresentationV1Request) Validate

func (m *CreatePresentationV1Request) Validate() error

Validate checks the field values on CreatePresentationV1Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreatePresentationV1RequestValidationError

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

CreatePresentationV1RequestValidationError is the validation error returned by CreatePresentationV1Request.Validate if the designated constraints aren't met.

func (CreatePresentationV1RequestValidationError) Cause

Cause function returns cause value.

func (CreatePresentationV1RequestValidationError) Error

Error satisfies the builtin error interface

func (CreatePresentationV1RequestValidationError) ErrorName

ErrorName returns error name.

func (CreatePresentationV1RequestValidationError) Field

Field function returns field value.

func (CreatePresentationV1RequestValidationError) Key

Key function returns key value.

func (CreatePresentationV1RequestValidationError) Reason

Reason function returns reason value.

type CreatePresentationV1Response

type CreatePresentationV1Response struct {
	PresentationId uint64 `protobuf:"varint,1,opt,name=presentation_id,json=presentationId,proto3" json:"presentation_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePresentationV1Response) Descriptor deprecated

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

Deprecated: Use CreatePresentationV1Response.ProtoReflect.Descriptor instead.

func (*CreatePresentationV1Response) GetPresentationId

func (x *CreatePresentationV1Response) GetPresentationId() uint64

func (*CreatePresentationV1Response) ProtoMessage

func (*CreatePresentationV1Response) ProtoMessage()

func (*CreatePresentationV1Response) ProtoReflect

func (*CreatePresentationV1Response) Reset

func (x *CreatePresentationV1Response) Reset()

func (*CreatePresentationV1Response) String

func (*CreatePresentationV1Response) Validate

func (m *CreatePresentationV1Response) Validate() error

Validate checks the field values on CreatePresentationV1Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreatePresentationV1ResponseValidationError

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

CreatePresentationV1ResponseValidationError is the validation error returned by CreatePresentationV1Response.Validate if the designated constraints aren't met.

func (CreatePresentationV1ResponseValidationError) Cause

Cause function returns cause value.

func (CreatePresentationV1ResponseValidationError) Error

Error satisfies the builtin error interface

func (CreatePresentationV1ResponseValidationError) ErrorName

ErrorName returns error name.

func (CreatePresentationV1ResponseValidationError) Field

Field function returns field value.

func (CreatePresentationV1ResponseValidationError) Key

Key function returns key value.

func (CreatePresentationV1ResponseValidationError) Reason

Reason function returns reason value.

type DescribePresentationV1Request

type DescribePresentationV1Request struct {
	PresentationId uint64 `protobuf:"varint,1,opt,name=presentation_id,json=presentationId,proto3" json:"presentation_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DescribePresentationV1Request) Descriptor deprecated

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

Deprecated: Use DescribePresentationV1Request.ProtoReflect.Descriptor instead.

func (*DescribePresentationV1Request) GetPresentationId

func (x *DescribePresentationV1Request) GetPresentationId() uint64

func (*DescribePresentationV1Request) ProtoMessage

func (*DescribePresentationV1Request) ProtoMessage()

func (*DescribePresentationV1Request) ProtoReflect

func (*DescribePresentationV1Request) Reset

func (x *DescribePresentationV1Request) Reset()

func (*DescribePresentationV1Request) String

func (*DescribePresentationV1Request) Validate

func (m *DescribePresentationV1Request) Validate() error

Validate checks the field values on DescribePresentationV1Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type DescribePresentationV1RequestValidationError

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

DescribePresentationV1RequestValidationError is the validation error returned by DescribePresentationV1Request.Validate if the designated constraints aren't met.

func (DescribePresentationV1RequestValidationError) Cause

Cause function returns cause value.

func (DescribePresentationV1RequestValidationError) Error

Error satisfies the builtin error interface

func (DescribePresentationV1RequestValidationError) ErrorName

ErrorName returns error name.

func (DescribePresentationV1RequestValidationError) Field

Field function returns field value.

func (DescribePresentationV1RequestValidationError) Key

Key function returns key value.

func (DescribePresentationV1RequestValidationError) Reason

Reason function returns reason value.

type DescribePresentationV1Response

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

func (*DescribePresentationV1Response) Descriptor deprecated

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

Deprecated: Use DescribePresentationV1Response.ProtoReflect.Descriptor instead.

func (*DescribePresentationV1Response) GetPresentation

func (x *DescribePresentationV1Response) GetPresentation() *Presentation

func (*DescribePresentationV1Response) ProtoMessage

func (*DescribePresentationV1Response) ProtoMessage()

func (*DescribePresentationV1Response) ProtoReflect

func (*DescribePresentationV1Response) Reset

func (x *DescribePresentationV1Response) Reset()

func (*DescribePresentationV1Response) String

func (*DescribePresentationV1Response) Validate

func (m *DescribePresentationV1Response) Validate() error

Validate checks the field values on DescribePresentationV1Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type DescribePresentationV1ResponseValidationError

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

DescribePresentationV1ResponseValidationError is the validation error returned by DescribePresentationV1Response.Validate if the designated constraints aren't met.

func (DescribePresentationV1ResponseValidationError) Cause

Cause function returns cause value.

func (DescribePresentationV1ResponseValidationError) Error

Error satisfies the builtin error interface

func (DescribePresentationV1ResponseValidationError) ErrorName

ErrorName returns error name.

func (DescribePresentationV1ResponseValidationError) Field

Field function returns field value.

func (DescribePresentationV1ResponseValidationError) Key

Key function returns key value.

func (DescribePresentationV1ResponseValidationError) Reason

Reason function returns reason value.

type ListPresentationsV1Request

type ListPresentationsV1Request struct {
	Limit  uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPresentationsV1Request) Descriptor deprecated

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

Deprecated: Use ListPresentationsV1Request.ProtoReflect.Descriptor instead.

func (*ListPresentationsV1Request) GetLimit

func (x *ListPresentationsV1Request) GetLimit() uint64

func (*ListPresentationsV1Request) GetOffset

func (x *ListPresentationsV1Request) GetOffset() uint64

func (*ListPresentationsV1Request) ProtoMessage

func (*ListPresentationsV1Request) ProtoMessage()

func (*ListPresentationsV1Request) ProtoReflect

func (*ListPresentationsV1Request) Reset

func (x *ListPresentationsV1Request) Reset()

func (*ListPresentationsV1Request) String

func (x *ListPresentationsV1Request) String() string

func (*ListPresentationsV1Request) Validate

func (m *ListPresentationsV1Request) Validate() error

Validate checks the field values on ListPresentationsV1Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListPresentationsV1RequestValidationError

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

ListPresentationsV1RequestValidationError is the validation error returned by ListPresentationsV1Request.Validate if the designated constraints aren't met.

func (ListPresentationsV1RequestValidationError) Cause

Cause function returns cause value.

func (ListPresentationsV1RequestValidationError) Error

Error satisfies the builtin error interface

func (ListPresentationsV1RequestValidationError) ErrorName

ErrorName returns error name.

func (ListPresentationsV1RequestValidationError) Field

Field function returns field value.

func (ListPresentationsV1RequestValidationError) Key

Key function returns key value.

func (ListPresentationsV1RequestValidationError) Reason

Reason function returns reason value.

type ListPresentationsV1Response

type ListPresentationsV1Response struct {
	Presentations []*Presentation `protobuf:"bytes,1,rep,name=presentations,proto3" json:"presentations,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPresentationsV1Response) Descriptor deprecated

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

Deprecated: Use ListPresentationsV1Response.ProtoReflect.Descriptor instead.

func (*ListPresentationsV1Response) GetPresentations

func (x *ListPresentationsV1Response) GetPresentations() []*Presentation

func (*ListPresentationsV1Response) ProtoMessage

func (*ListPresentationsV1Response) ProtoMessage()

func (*ListPresentationsV1Response) ProtoReflect

func (*ListPresentationsV1Response) Reset

func (x *ListPresentationsV1Response) Reset()

func (*ListPresentationsV1Response) String

func (x *ListPresentationsV1Response) String() string

func (*ListPresentationsV1Response) Validate

func (m *ListPresentationsV1Response) Validate() error

Validate checks the field values on ListPresentationsV1Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListPresentationsV1ResponseValidationError

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

ListPresentationsV1ResponseValidationError is the validation error returned by ListPresentationsV1Response.Validate if the designated constraints aren't met.

func (ListPresentationsV1ResponseValidationError) Cause

Cause function returns cause value.

func (ListPresentationsV1ResponseValidationError) Error

Error satisfies the builtin error interface

func (ListPresentationsV1ResponseValidationError) ErrorName

ErrorName returns error name.

func (ListPresentationsV1ResponseValidationError) Field

Field function returns field value.

func (ListPresentationsV1ResponseValidationError) Key

Key function returns key value.

func (ListPresentationsV1ResponseValidationError) Reason

Reason function returns reason value.

type Presentation

type Presentation struct {
	PresentationId uint64 `protobuf:"varint,1,opt,name=presentation_id,json=presentationId,proto3" json:"presentation_id,omitempty"`
	UserId         uint64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	LessonId       uint64 `protobuf:"varint,3,opt,name=lesson_id,json=lessonId,proto3" json:"lesson_id,omitempty"`
	Name           string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Description    string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Presentation) Descriptor deprecated

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

Deprecated: Use Presentation.ProtoReflect.Descriptor instead.

func (*Presentation) GetDescription

func (x *Presentation) GetDescription() string

func (*Presentation) GetLessonId

func (x *Presentation) GetLessonId() uint64

func (*Presentation) GetName

func (x *Presentation) GetName() string

func (*Presentation) GetPresentationId

func (x *Presentation) GetPresentationId() uint64

func (*Presentation) GetUserId

func (x *Presentation) GetUserId() uint64

func (*Presentation) ProtoMessage

func (*Presentation) ProtoMessage()

func (*Presentation) ProtoReflect

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

func (*Presentation) Reset

func (x *Presentation) Reset()

func (*Presentation) String

func (x *Presentation) String() string

func (*Presentation) Validate

func (m *Presentation) Validate() error

Validate checks the field values on Presentation with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PresentationAPIClient

type PresentationAPIClient interface {
	// Creates a new presentation
	CreatePresentationV1(ctx context.Context, in *CreatePresentationV1Request, opts ...grpc.CallOption) (*CreatePresentationV1Response, error)
	// Returns a presentation by id
	DescribePresentationV1(ctx context.Context, in *DescribePresentationV1Request, opts ...grpc.CallOption) (*DescribePresentationV1Response, error)
	// Returns a list of presentations
	ListPresentationsV1(ctx context.Context, in *ListPresentationsV1Request, opts ...grpc.CallOption) (*ListPresentationsV1Response, error)
	// Removes a presentation by id
	RemovePresentationV1(ctx context.Context, in *RemovePresentationV1Request, opts ...grpc.CallOption) (*RemovePresentationV1Response, error)
}

PresentationAPIClient is the client API for PresentationAPI 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 PresentationAPIServer

type PresentationAPIServer interface {
	// Creates a new presentation
	CreatePresentationV1(context.Context, *CreatePresentationV1Request) (*CreatePresentationV1Response, error)
	// Returns a presentation by id
	DescribePresentationV1(context.Context, *DescribePresentationV1Request) (*DescribePresentationV1Response, error)
	// Returns a list of presentations
	ListPresentationsV1(context.Context, *ListPresentationsV1Request) (*ListPresentationsV1Response, error)
	// Removes a presentation by id
	RemovePresentationV1(context.Context, *RemovePresentationV1Request) (*RemovePresentationV1Response, error)
	// contains filtered or unexported methods
}

PresentationAPIServer is the server API for PresentationAPI service. All implementations must embed UnimplementedPresentationAPIServer for forward compatibility

type PresentationValidationError

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

PresentationValidationError is the validation error returned by Presentation.Validate if the designated constraints aren't met.

func (PresentationValidationError) Cause

Cause function returns cause value.

func (PresentationValidationError) Error

Error satisfies the builtin error interface

func (PresentationValidationError) ErrorName

func (e PresentationValidationError) ErrorName() string

ErrorName returns error name.

func (PresentationValidationError) Field

Field function returns field value.

func (PresentationValidationError) Key

Key function returns key value.

func (PresentationValidationError) Reason

Reason function returns reason value.

type RemovePresentationV1Request

type RemovePresentationV1Request struct {
	PresentationId uint64 `protobuf:"varint,1,opt,name=presentation_id,json=presentationId,proto3" json:"presentation_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RemovePresentationV1Request) Descriptor deprecated

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

Deprecated: Use RemovePresentationV1Request.ProtoReflect.Descriptor instead.

func (*RemovePresentationV1Request) GetPresentationId

func (x *RemovePresentationV1Request) GetPresentationId() uint64

func (*RemovePresentationV1Request) ProtoMessage

func (*RemovePresentationV1Request) ProtoMessage()

func (*RemovePresentationV1Request) ProtoReflect

func (*RemovePresentationV1Request) Reset

func (x *RemovePresentationV1Request) Reset()

func (*RemovePresentationV1Request) String

func (x *RemovePresentationV1Request) String() string

func (*RemovePresentationV1Request) Validate

func (m *RemovePresentationV1Request) Validate() error

Validate checks the field values on RemovePresentationV1Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RemovePresentationV1RequestValidationError

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

RemovePresentationV1RequestValidationError is the validation error returned by RemovePresentationV1Request.Validate if the designated constraints aren't met.

func (RemovePresentationV1RequestValidationError) Cause

Cause function returns cause value.

func (RemovePresentationV1RequestValidationError) Error

Error satisfies the builtin error interface

func (RemovePresentationV1RequestValidationError) ErrorName

ErrorName returns error name.

func (RemovePresentationV1RequestValidationError) Field

Field function returns field value.

func (RemovePresentationV1RequestValidationError) Key

Key function returns key value.

func (RemovePresentationV1RequestValidationError) Reason

Reason function returns reason value.

type RemovePresentationV1Response

type RemovePresentationV1Response struct {
	Found bool `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"`
	// contains filtered or unexported fields
}

func (*RemovePresentationV1Response) Descriptor deprecated

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

Deprecated: Use RemovePresentationV1Response.ProtoReflect.Descriptor instead.

func (*RemovePresentationV1Response) GetFound

func (x *RemovePresentationV1Response) GetFound() bool

func (*RemovePresentationV1Response) ProtoMessage

func (*RemovePresentationV1Response) ProtoMessage()

func (*RemovePresentationV1Response) ProtoReflect

func (*RemovePresentationV1Response) Reset

func (x *RemovePresentationV1Response) Reset()

func (*RemovePresentationV1Response) String

func (*RemovePresentationV1Response) Validate

func (m *RemovePresentationV1Response) Validate() error

Validate checks the field values on RemovePresentationV1Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RemovePresentationV1ResponseValidationError

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

RemovePresentationV1ResponseValidationError is the validation error returned by RemovePresentationV1Response.Validate if the designated constraints aren't met.

func (RemovePresentationV1ResponseValidationError) Cause

Cause function returns cause value.

func (RemovePresentationV1ResponseValidationError) Error

Error satisfies the builtin error interface

func (RemovePresentationV1ResponseValidationError) ErrorName

ErrorName returns error name.

func (RemovePresentationV1ResponseValidationError) Field

Field function returns field value.

func (RemovePresentationV1ResponseValidationError) Key

Key function returns key value.

func (RemovePresentationV1ResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedPresentationAPIServer

type UnimplementedPresentationAPIServer struct {
}

UnimplementedPresentationAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedPresentationAPIServer) ListPresentationsV1

type UnsafePresentationAPIServer

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

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

Jump to

Keyboard shortcuts

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