Documentation ¶
Index ¶
- type BigTestMock
- func (b *BigTestMock) CreateHaveAll(ctx context.Context, req *pb.CreateHaveAllRequest) (*pb.CreateHaveAllResponse, error)
- func (b *BigTestMock) DeepPath(ctx context.Context, req *pb.DeepHaveAllRequest) (*pb.DeepHaveAllResponse, error)
- func (b *BigTestMock) DeleteSmall(ctx context.Context, req *pb.DeleteSmallRequest) (*pb.DeleteSmallResponse, error)
- func (b *BigTestMock) DoNotCreate(ctx context.Context, req *pb.DoNotCreateRequest) (*pb.DoNotCreateResponse, error)
- func (b *BigTestMock) EmptyRequestMessage(ctx context.Context, req *pb.EmptyRequestMessageRequest) (*pb.EmptyRequestMessageResponse, error)
- func (b *BigTestMock) GetHaveAll(ctx context.Context, req *pb.GetHaveAllRequest) (*pb.GetHaveAllResponse, error)
- func (b *BigTestMock) GetLongPath(ctx context.Context, req *pb.GetLongPathRequest) (*pb.GetLongPathResponse, error)
- func (b *BigTestMock) GetPathPath(ctx context.Context, req *pb.DeepPathPathRequest) (*pb.DeepPathPathResponse, error)
- func (b *BigTestMock) GetSmall(ctx context.Context, req *pb.GetSmallRequest) (*pb.GetSmallResponse, error)
- func (b *BigTestMock) GetSmall1(ctx context.Context, req *pb.GetSmallRequest) (*pb.GetSmallResponse, error)
- func (b *BigTestMock) PageSortFilter(ctx context.Context, req *pb.PageSortFilterRequest) (*pb.PageSortFilterResponse, error)
- func (b *BigTestMock) PostSmall(ctx context.Context, req *pb.PostSmallRequest) (*pb.PostSmallResponse, error)
- func (b *BigTestMock) PutSmall(ctx context.Context, req *pb.PutSmallRequest) (*pb.PutSmallResponse, error)
- type GeneratedService
- func (s *GeneratedService) CreateHaveAll(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) DeepPath(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) DeleteSmall(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) EmptyRequestMessage(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) GetBaseURI() string
- func (s *GeneratedService) GetHandlersToRegister() []rest.Register
- func (s *GeneratedService) GetHaveAll(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) GetLongPath(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) GetPathPath(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) GetSmall(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) GetSmall1(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) PageSortFilter(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) PostSmall(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) PutSmall(w http.ResponseWriter, r *http.Request)
- func (s *GeneratedService) SetErrorHandler(h rest.ErrorHandler) error
- type QSParameter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigTestMock ¶
type BigTestMock struct { Small map[uint32]*pb.Small pb.UnimplementedBigTestServiceServer }
BigTestMock represents logic reachable via a REST endpoint.
func NewBigTestMock ¶
func NewBigTestMock() *BigTestMock
NewBigTestMock instantiates a new BigTestMock
func (*BigTestMock) CreateHaveAll ¶
func (b *BigTestMock) CreateHaveAll(ctx context.Context, req *pb.CreateHaveAllRequest) (*pb.CreateHaveAllResponse, error)
CreateHaveAll should create a HaveAll message. Excluded from HaveAll are the "repeated"-fields (slices). This is not supported at the moment.
func (*BigTestMock) DeepPath ¶
func (b *BigTestMock) DeepPath(ctx context.Context, req *pb.DeepHaveAllRequest) (*pb.DeepHaveAllResponse, error)
DeepPath retrieves a value deeply nested in structs and returns this value.
func (*BigTestMock) DeleteSmall ¶
func (b *BigTestMock) DeleteSmall(ctx context.Context, req *pb.DeleteSmallRequest) (*pb.DeleteSmallResponse, error)
DeleteSmall deletes a Small message from a storage.
func (*BigTestMock) DoNotCreate ¶
func (b *BigTestMock) DoNotCreate(ctx context.Context, req *pb.DoNotCreateRequest) (*pb.DoNotCreateResponse, error)
DoNotCreate is a testcase for a method without an method_map option. Therefore no REST frontend should be generated
func (*BigTestMock) EmptyRequestMessage ¶
func (b *BigTestMock) EmptyRequestMessage(ctx context.Context, req *pb.EmptyRequestMessageRequest) (*pb.EmptyRequestMessageResponse, error)
EmptyRequestMessage returns an empty protobuf message.
func (*BigTestMock) GetHaveAll ¶
func (b *BigTestMock) GetHaveAll(ctx context.Context, req *pb.GetHaveAllRequest) (*pb.GetHaveAllResponse, error)
GetHaveAll should retrieve the HaveAll message with the id given in the path Excluded from HaveAll are the "repeated"-fields (slices). This is not supported at the moment.
func (*BigTestMock) GetLongPath ¶
func (b *BigTestMock) GetLongPath(ctx context.Context, req *pb.GetLongPathRequest) (*pb.GetLongPathResponse, error)
GetLongPath returns one value of more than one path parameter.
func (*BigTestMock) GetPathPath ¶
func (b *BigTestMock) GetPathPath(ctx context.Context, req *pb.DeepPathPathRequest) (*pb.DeepPathPathResponse, error)
GetPathPath returns the given value of a deeply nested struct.
func (*BigTestMock) GetSmall ¶
func (b *BigTestMock) GetSmall(ctx context.Context, req *pb.GetSmallRequest) (*pb.GetSmallResponse, error)
GetSmall returns a Small message identified by a given ID.
func (*BigTestMock) GetSmall1 ¶
func (b *BigTestMock) GetSmall1(ctx context.Context, req *pb.GetSmallRequest) (*pb.GetSmallResponse, error)
GetSmall1 is just a test for route registration, that's why no logic.
func (*BigTestMock) PageSortFilter ¶
func (b *BigTestMock) PageSortFilter(ctx context.Context, req *pb.PageSortFilterRequest) (*pb.PageSortFilterResponse, error)
PageSortFilter returns the given values of the Page, Sort and Filter messages.
func (*BigTestMock) PostSmall ¶
func (b *BigTestMock) PostSmall(ctx context.Context, req *pb.PostSmallRequest) (*pb.PostSmallResponse, error)
PostSmall is a flaw: id of the updated resource should be in the URI. An id from the URI should be mapped into posted objects.
func (*BigTestMock) PutSmall ¶
func (b *BigTestMock) PutSmall(ctx context.Context, req *pb.PutSmallRequest) (*pb.PutSmallResponse, error)
PutSmall adds a Small message to a storage.
type GeneratedService ¶
type GeneratedService struct { Service pb.BigTestServiceServer // contains filtered or unexported fields }
func NewGeneratedService ¶
func NewGeneratedService(s pb.BigTestServiceServer, errorHandler rest.ErrorHandler) (*GeneratedService, error)
func (*GeneratedService) CreateHaveAll ¶
func (s *GeneratedService) CreateHaveAll(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) DeepPath ¶
func (s *GeneratedService) DeepPath(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) DeleteSmall ¶
func (s *GeneratedService) DeleteSmall(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) EmptyRequestMessage ¶
func (s *GeneratedService) EmptyRequestMessage(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) GetBaseURI ¶
func (s *GeneratedService) GetBaseURI() string
func (*GeneratedService) GetHandlersToRegister ¶
func (s *GeneratedService) GetHandlersToRegister() []rest.Register
func (*GeneratedService) GetHaveAll ¶
func (s *GeneratedService) GetHaveAll(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) GetLongPath ¶
func (s *GeneratedService) GetLongPath(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) GetPathPath ¶
func (s *GeneratedService) GetPathPath(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) GetSmall ¶
func (s *GeneratedService) GetSmall(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) GetSmall1 ¶
func (s *GeneratedService) GetSmall1(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) PageSortFilter ¶
func (s *GeneratedService) PageSortFilter(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) PostSmall ¶
func (s *GeneratedService) PostSmall(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) PutSmall ¶
func (s *GeneratedService) PutSmall(w http.ResponseWriter, r *http.Request)
func (*GeneratedService) SetErrorHandler ¶
func (s *GeneratedService) SetErrorHandler(h rest.ErrorHandler) error