grpc_context_impl

package
v0.0.0-...-b679324 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InternalServerError = "Internal server error"
	BadRequest          = "Bad request"
	Unauthorized        = "Unauthorized"
	NotFound            = "Not found"
	Unimplemented       = "Unimplemented"
	Conflict            = "Conflict"
)

Functions

This section is empty.

Types

type ServiceContextImpl

type ServiceContextImpl[R any] struct {
	ResponseData   R
	ResponseStatus int
	// contains filtered or unexported fields
}

func NewServiceContext

func NewServiceContext[R any](ctx context.Context) *ServiceContextImpl[R]

func (*ServiceContextImpl[R]) BadRequest

func (s *ServiceContextImpl[R]) BadRequest() error

func (*ServiceContextImpl[R]) Conflict

func (s *ServiceContextImpl[R]) Conflict() error

func (*ServiceContextImpl[R]) Context

func (s *ServiceContextImpl[R]) Context() context.Context

func (*ServiceContextImpl[R]) ErrorMessage

func (s *ServiceContextImpl[R]) ErrorMessage(statusCode int, message string) error

func (*ServiceContextImpl[R]) InternalServerError

func (s *ServiceContextImpl[R]) InternalServerError() error

func (*ServiceContextImpl[R]) MethodNotAllowed

func (s *ServiceContextImpl[R]) MethodNotAllowed() error

func (*ServiceContextImpl[R]) NotFound

func (s *ServiceContextImpl[R]) NotFound() error

func (*ServiceContextImpl[R]) Response

func (s *ServiceContextImpl[R]) Response(status int, body R) error

func (*ServiceContextImpl[R]) Unauthorized

func (s *ServiceContextImpl[R]) Unauthorized() error

Jump to

Keyboard shortcuts

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