examplepb

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package examplepb is a generated protocol buffer package.

It is generated from these files:

example/examplepb/example.proto

It has these top-level messages:

User
Address
Group
CreateUserRequest
UpdateUserRequest
EmptyRequest
EmptyResponse
Profile
UpdateProfileRequest

Package examplepb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtlasValidateAnnotator

func AtlasValidateAnnotator(ctx context.Context, r *http.Request) metadata.MD

AtlasValidateAnnotator parses JSON input and validates unknown fields based on 'allow_unknown_fields' options specified in proto file.

func RegisterGroupsHandler

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

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

func RegisterGroupsHandlerClient

func RegisterGroupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GroupsClient) error

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

func RegisterGroupsHandlerFromEndpoint

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

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

func RegisterGroupsServer

func RegisterGroupsServer(s *grpc.Server, srv GroupsServer)

func RegisterProfilesHandler

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

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

func RegisterProfilesHandlerClient

func RegisterProfilesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfilesClient) error

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

func RegisterProfilesHandlerFromEndpoint

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

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

func RegisterProfilesServer

func RegisterProfilesServer(s *grpc.Server, srv ProfilesServer)

func RegisterUsersHandler

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

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

func RegisterUsersHandlerClient

func RegisterUsersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsersClient) error

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

func RegisterUsersHandlerFromEndpoint

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

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

func RegisterUsersServer

func RegisterUsersServer(s *grpc.Server, srv UsersServer)

Types

type Address

type Address struct {
	Country string `protobuf:"bytes,1,opt,name=country" json:"country,omitempty"`
	State   string `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"`
	City    string `protobuf:"bytes,3,opt,name=city" json:"city,omitempty"`
	Zip     string `protobuf:"bytes,4,opt,name=zip" json:"zip,omitempty"`
}

func (*Address) AtlasValidateJSON

func (o *Address) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object Address.

func (*Address) Descriptor

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

func (*Address) GetCity

func (m *Address) GetCity() string

func (*Address) GetCountry

func (m *Address) GetCountry() string

func (*Address) GetState

func (m *Address) GetState() string

func (*Address) GetZip

func (m *Address) GetZip() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) Reset

func (m *Address) Reset()

func (*Address) String

func (m *Address) String() string

type CreateUserRequest

type CreateUserRequest struct {
	Payload *User `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
}

func (*CreateUserRequest) AtlasValidateJSON

func (o *CreateUserRequest) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object CreateUserRequest.

func (*CreateUserRequest) Descriptor

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

func (*CreateUserRequest) GetPayload

func (m *CreateUserRequest) GetPayload() *User

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) Reset

func (m *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (m *CreateUserRequest) String() string

type EmptyRequest

type EmptyRequest struct {
}

func (*EmptyRequest) AtlasValidateJSON

func (o *EmptyRequest) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object EmptyRequest.

func (*EmptyRequest) Descriptor

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

func (*EmptyRequest) ProtoMessage

func (*EmptyRequest) ProtoMessage()

func (*EmptyRequest) Reset

func (m *EmptyRequest) Reset()

func (*EmptyRequest) String

func (m *EmptyRequest) String() string

type EmptyResponse

type EmptyResponse struct {
}

func (*EmptyResponse) AtlasValidateJSON

func (o *EmptyResponse) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object EmptyResponse.

func (*EmptyResponse) Descriptor

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

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) Reset

func (m *EmptyResponse) Reset()

func (*EmptyResponse) String

func (m *EmptyResponse) String() string

type Group

type Group struct {
	Id    int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Notes string `protobuf:"bytes,3,opt,name=notes" json:"notes,omitempty"`
}

func (*Group) AtlasValidateJSON

func (o *Group) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object Group.

func (*Group) Descriptor

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

func (*Group) GetId

func (m *Group) GetId() int32

func (*Group) GetName

func (m *Group) GetName() string

func (*Group) GetNotes

func (m *Group) GetNotes() string

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) Reset

func (m *Group) Reset()

func (*Group) String

func (m *Group) String() string

type GroupsClient

type GroupsClient interface {
	Create(ctx context.Context, in *Group, opts ...grpc.CallOption) (*EmptyResponse, error)
	Update(ctx context.Context, in *Group, opts ...grpc.CallOption) (*EmptyResponse, error)
	ValidatedList(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
}

func NewGroupsClient

func NewGroupsClient(cc *grpc.ClientConn) GroupsClient

type GroupsServer

type GroupsServer interface {
	Create(context.Context, *Group) (*EmptyResponse, error)
	Update(context.Context, *Group) (*EmptyResponse, error)
	ValidatedList(context.Context, *EmptyRequest) (*EmptyResponse, error)
}

type Profile

type Profile struct {
	Id    int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Notes string `protobuf:"bytes,3,opt,name=notes" json:"notes,omitempty"`
}

func (*Profile) AtlasValidateJSON

func (o *Profile) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object Profile.

func (*Profile) Descriptor

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

func (*Profile) GetId

func (m *Profile) GetId() int32

func (*Profile) GetName

func (m *Profile) GetName() string

func (*Profile) GetNotes

func (m *Profile) GetNotes() string

func (*Profile) ProtoMessage

func (*Profile) ProtoMessage()

func (*Profile) Reset

func (m *Profile) Reset()

func (*Profile) String

func (m *Profile) String() string

type ProfilesClient

type ProfilesClient interface {
	Create(ctx context.Context, in *Profile, opts ...grpc.CallOption) (*EmptyResponse, error)
	Update(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
}

func NewProfilesClient

func NewProfilesClient(cc *grpc.ClientConn) ProfilesClient

type ProfilesServer

type ProfilesServer interface {
	Create(context.Context, *Profile) (*EmptyResponse, error)
	Update(context.Context, *UpdateProfileRequest) (*EmptyResponse, error)
}

type UpdateProfileRequest

type UpdateProfileRequest struct {
	Payload *Profile `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
}

func (*UpdateProfileRequest) AtlasValidateJSON

func (o *UpdateProfileRequest) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object UpdateProfileRequest.

func (*UpdateProfileRequest) Descriptor

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

func (*UpdateProfileRequest) GetPayload

func (m *UpdateProfileRequest) GetPayload() *Profile

func (*UpdateProfileRequest) ProtoMessage

func (*UpdateProfileRequest) ProtoMessage()

func (*UpdateProfileRequest) Reset

func (m *UpdateProfileRequest) Reset()

func (*UpdateProfileRequest) String

func (m *UpdateProfileRequest) String() string

type UpdateUserRequest

type UpdateUserRequest struct {
	Payload *User `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
}

func (*UpdateUserRequest) AtlasValidateJSON

func (o *UpdateUserRequest) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object UpdateUserRequest.

func (*UpdateUserRequest) Descriptor

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

func (*UpdateUserRequest) GetPayload

func (m *UpdateUserRequest) GetPayload() *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 {
	Id           int32                  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name         string                 `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Profile      *Profile               `protobuf:"bytes,3,opt,name=profile" json:"profile,omitempty"`
	Address      *Address               `protobuf:"bytes,4,opt,name=address" json:"address,omitempty"`
	Groups       []*Group               `protobuf:"bytes,5,rep,name=groups" json:"groups,omitempty"`
	Parents      []*User_Parent         `protobuf:"bytes,6,rep,name=parents" json:"parents,omitempty"`
	ExternalUser *external.ExternalUser `protobuf:"bytes,7,opt,name=external_user,json=externalUser" json:"external_user,omitempty"`
}

func (*User) AtlasValidateJSON

func (o *User) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object User.

func (*User) Descriptor

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

func (*User) GetAddress

func (m *User) GetAddress() *Address

func (*User) GetExternalUser

func (m *User) GetExternalUser() *external.ExternalUser

func (*User) GetGroups

func (m *User) GetGroups() []*Group

func (*User) GetId

func (m *User) GetId() int32

func (*User) GetName

func (m *User) GetName() string

func (*User) GetParents

func (m *User) GetParents() []*User_Parent

func (*User) GetProfile

func (m *User) GetProfile() *Profile

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

type User_Parent

type User_Parent struct {
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

func (*User_Parent) AtlasValidateJSON

func (o *User_Parent) AtlasValidateJSON(r json.RawMessage, path string, allowUnknown bool) (err error)

AtlasValidateJSON function validates a JSON for object User_Parent.

func (*User_Parent) Descriptor

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

func (*User_Parent) GetName

func (m *User_Parent) GetName() string

func (*User_Parent) ProtoMessage

func (*User_Parent) ProtoMessage()

func (*User_Parent) Reset

func (m *User_Parent) Reset()

func (*User_Parent) String

func (m *User_Parent) String() string

type UsersClient

type UsersClient interface {
	Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	List(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	UpdateExternalUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*EmptyResponse, error)
	UpdateExternalUser2(ctx context.Context, in *external.ExternalUser, opts ...grpc.CallOption) (*EmptyResponse, error)
}

func NewUsersClient

func NewUsersClient(cc *grpc.ClientConn) UsersClient

Jump to

Keyboard shortcuts

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