test

package
v0.0.0-...-ec7ef87 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package test is a generated protocol buffer package.

It is generated from these files:

proto/test.proto

It has these top-level messages:

UpdateUserRequest
User

Package test is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTestFieldMaskHandler

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

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

func RegisterTestFieldMaskHandlerClient

func RegisterTestFieldMaskHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TestFieldMaskClient) error

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

func RegisterTestFieldMaskHandlerFromEndpoint

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

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

func RegisterTestFieldMaskServer

func RegisterTestFieldMaskServer(s *grpc.Server, srv TestFieldMaskServer)

Types

type TestFieldMaskClient

type TestFieldMaskClient interface {
	// Update an existing user.
	UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error)
}

func NewTestFieldMaskClient

func NewTestFieldMaskClient(cc *grpc.ClientConn) TestFieldMaskClient

type TestFieldMaskServer

type TestFieldMaskServer interface {
	// Update an existing user.
	UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
}

type UpdateUserRequest

type UpdateUserRequest struct {
	// The user resource which replaces the resource on the server.
	User *User `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
	// The update mask applies to the resource. For the `FieldMask` definition,
	// see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
	UpdateMask *google_protobuf.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
}

func (*UpdateUserRequest) Descriptor

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

func (*UpdateUserRequest) GetUpdateMask

func (m *UpdateUserRequest) GetUpdateMask() *google_protobuf.FieldMask

func (*UpdateUserRequest) GetUser

func (m *UpdateUserRequest) GetUser() *User

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) Reset

func (m *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (m *UpdateUserRequest) String() string

type User

type User struct {
	// Relative resource name.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// Display name.
	DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName" json:"display_name,omitempty"`
	// Description.
	Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
}

func (*User) Descriptor

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

func (*User) GetDescription

func (m *User) GetDescription() string

func (*User) GetDisplayName

func (m *User) GetDisplayName() string

func (*User) GetName

func (m *User) GetName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

Jump to

Keyboard shortcuts

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