pb

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2018 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

pb/profile.proto

It has these top-level messages:

EmptyMessage
VersionResponse
ServiceStatus
ServicesStatusList
ProfileInfo
ProfileRequest
ProfileResponse
ProfileResponseLight
ProfileCreationRequest
ProfileListRequest
ProfileList

Package pb is a generated protocol buffer package.

It is generated from these files:

pb/profile.proto

It has these top-level messages:

EmptyMessage
VersionResponse
ServiceStatus
ServicesStatusList
ProfileInfo
ProfileRequest
ProfileResponse
ProfileResponseLight
ProfileCreationRequest
ProfileListRequest
ProfileList

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pb is a generated protocol buffer package.

It is generated from these files:

pb/profile.proto

It has these top-level messages:

EmptyMessage
VersionResponse
ServiceStatus
ServicesStatusList
ProfileInfo
ProfileRequest
ProfileResponse
ProfileResponseLight
ProfileCreationRequest
ProfileListRequest
ProfileList

Code generated by protoc-gen-gomeet-service. DO NOT EDIT. source: pb/profile.proto

Code generated by go generate. DO NOT EDIT source: profile.swagger.json

Index

Constants

View Source
const (
	// SwaggerURL is the url for swagger.json
	SwaggerURL = "/api/v1/swagger.json"

	// Swagger expose the json representation
	Swagger = swagger
)

Variables

View Source
var Genders_name = map[int32]string{
	0: "UNKNOW",
	1: "MALE",
	2: "FEMALE",
}
View Source
var Genders_value = map[string]int32{
	"UNKNOW": 0,
	"MALE":   1,
	"FEMALE": 2,
}
View Source
var ServiceStatus_Status_name = map[int32]string{
	0: "OK",
	1: "UNAVAILABLE",
}
View Source
var ServiceStatus_Status_value = map[string]int32{
	"OK":          0,
	"UNAVAILABLE": 1,
}

Functions

func GomeetFakerRand

func GomeetFakerRand() *rand.Rand

func GomeetFakerSetLocale

func GomeetFakerSetLocale(l string)

func RegisterProfileHandler

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

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

func RegisterProfileHandlerClient

func RegisterProfileHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfileClient) error

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

func RegisterProfileHandlerFromEndpoint

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

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

func RegisterProfileServer

func RegisterProfileServer(s *grpc.Server, srv ProfileServer)

Types

type EmptyMessage

type EmptyMessage struct {
}

func NewEmptyMessageGomeetFaker

func NewEmptyMessageGomeetFaker() *EmptyMessage

func NewPopulatedEmptyMessage

func NewPopulatedEmptyMessage(r randyProfile, easy bool) *EmptyMessage

func (*EmptyMessage) Descriptor

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

func (*EmptyMessage) Equal

func (this *EmptyMessage) Equal(that interface{}) bool

func (*EmptyMessage) ProtoMessage

func (*EmptyMessage) ProtoMessage()

func (*EmptyMessage) Reset

func (m *EmptyMessage) Reset()

func (*EmptyMessage) String

func (m *EmptyMessage) String() string

func (*EmptyMessage) Validate

func (this *EmptyMessage) Validate() error

type Genders

type Genders int32
const (
	Genders_UNKNOW Genders = 0
	Genders_MALE   Genders = 1
	Genders_FEMALE Genders = 2
)

func (Genders) EnumDescriptor

func (Genders) EnumDescriptor() ([]byte, []int)

func (Genders) String

func (x Genders) String() string

type ProfileClient

type ProfileClient interface {
	// Version method receives no paramaters and returns a version message.
	Version(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*VersionResponse, error)
	// ServicesStatus method receives no paramaters and returns all services status message
	ServicesStatus(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*ServicesStatusList, error)
	// Create attempts to create a new profile.
	Create(ctx context.Context, in *ProfileCreationRequest, opts ...grpc.CallOption) (*ProfileResponse, error)
	// Read returns information about an existing profile.
	Read(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (*ProfileInfo, error)
	// List returns a list of profiles matching a set of criteria.
	List(ctx context.Context, in *ProfileListRequest, opts ...grpc.CallOption) (*ProfileList, error)
	// Update attempts to update an existing profile.
	Update(ctx context.Context, in *ProfileInfo, opts ...grpc.CallOption) (*ProfileResponse, error)
	// SoftDelete attempts to delete an existing profile logically.
	SoftDelete(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (*ProfileResponse, error)
	// HardDelete attempts to delete an existing profile physically.
	HardDelete(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (*ProfileResponseLight, error)
}

func NewProfileClient

func NewProfileClient(cc *grpc.ClientConn) ProfileClient

type ProfileCreationRequest

type ProfileCreationRequest struct {
	Gender   Genders `protobuf:"varint,1,opt,name=gender,proto3,enum=grpc.gomeetexamples.profile.Genders" json:"gender,omitempty"`
	Email    string  `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Name     string  `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Birthday string  `protobuf:"bytes,4,opt,name=birthday,proto3" json:"birthday,omitempty"`
}

ProfileCreationRequest encodes a profile creation request.

func NewPopulatedProfileCreationRequest

func NewPopulatedProfileCreationRequest(r randyProfile, easy bool) *ProfileCreationRequest

func NewProfileCreationRequestGomeetFaker

func NewProfileCreationRequestGomeetFaker() *ProfileCreationRequest

func (*ProfileCreationRequest) Descriptor

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

func (*ProfileCreationRequest) Equal

func (this *ProfileCreationRequest) Equal(that interface{}) bool

func (*ProfileCreationRequest) GetBirthday

func (m *ProfileCreationRequest) GetBirthday() string

func (*ProfileCreationRequest) GetEmail

func (m *ProfileCreationRequest) GetEmail() string

func (*ProfileCreationRequest) GetGender

func (m *ProfileCreationRequest) GetGender() Genders

func (*ProfileCreationRequest) GetName

func (m *ProfileCreationRequest) GetName() string

func (*ProfileCreationRequest) ProtoMessage

func (*ProfileCreationRequest) ProtoMessage()

func (*ProfileCreationRequest) Reset

func (m *ProfileCreationRequest) Reset()

func (*ProfileCreationRequest) String

func (m *ProfileCreationRequest) String() string

func (*ProfileCreationRequest) Validate

func (this *ProfileCreationRequest) Validate() error

type ProfileInfo

type ProfileInfo struct {
	Uuid      string  `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Gender    Genders `protobuf:"varint,2,opt,name=gender,proto3,enum=grpc.gomeetexamples.profile.Genders" json:"gender,omitempty"`
	Email     string  `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Name      string  `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Birthday  string  `protobuf:"bytes,5,opt,name=birthday,proto3" json:"birthday,omitempty"`
	CreatedAt string  `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt string  `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	DeletedAt string  `protobuf:"bytes,8,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
}

ProfileInfo encodes information about a profile.

func NewPopulatedProfileInfo

func NewPopulatedProfileInfo(r randyProfile, easy bool) *ProfileInfo

func NewProfileInfoGomeetFaker

func NewProfileInfoGomeetFaker() *ProfileInfo

func (*ProfileInfo) Descriptor

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

func (*ProfileInfo) Equal

func (this *ProfileInfo) Equal(that interface{}) bool

func (*ProfileInfo) GetBirthday

func (m *ProfileInfo) GetBirthday() string

func (*ProfileInfo) GetCreatedAt

func (m *ProfileInfo) GetCreatedAt() string

func (*ProfileInfo) GetDeletedAt

func (m *ProfileInfo) GetDeletedAt() string

func (*ProfileInfo) GetEmail

func (m *ProfileInfo) GetEmail() string

func (*ProfileInfo) GetGender

func (m *ProfileInfo) GetGender() Genders

func (*ProfileInfo) GetName

func (m *ProfileInfo) GetName() string

func (*ProfileInfo) GetUpdatedAt

func (m *ProfileInfo) GetUpdatedAt() string

func (*ProfileInfo) GetUuid

func (m *ProfileInfo) GetUuid() string

func (*ProfileInfo) ProtoMessage

func (*ProfileInfo) ProtoMessage()

func (*ProfileInfo) Reset

func (m *ProfileInfo) Reset()

func (*ProfileInfo) String

func (m *ProfileInfo) String() string

func (*ProfileInfo) Validate

func (this *ProfileInfo) Validate() error

type ProfileList

type ProfileList struct {
	ResultSetSize uint32         `protobuf:"varint,1,opt,name=result_set_size,json=resultSetSize,proto3" json:"result_set_size,omitempty"`
	HasMore       bool           `protobuf:"varint,2,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
	Profiles      []*ProfileInfo `protobuf:"bytes,3,rep,name=profiles" json:"profiles,omitempty"`
}

ProfileList encodes the result of a ProfileListRequest.

func NewPopulatedProfileList

func NewPopulatedProfileList(r randyProfile, easy bool) *ProfileList

func NewProfileListGomeetFaker

func NewProfileListGomeetFaker() *ProfileList

func (*ProfileList) Descriptor

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

func (*ProfileList) Equal

func (this *ProfileList) Equal(that interface{}) bool

func (*ProfileList) GetHasMore

func (m *ProfileList) GetHasMore() bool

func (*ProfileList) GetProfiles

func (m *ProfileList) GetProfiles() []*ProfileInfo

func (*ProfileList) GetResultSetSize

func (m *ProfileList) GetResultSetSize() uint32

func (*ProfileList) ProtoMessage

func (*ProfileList) ProtoMessage()

func (*ProfileList) Reset

func (m *ProfileList) Reset()

func (*ProfileList) String

func (m *ProfileList) String() string

func (*ProfileList) Validate

func (this *ProfileList) Validate() error

type ProfileListRequest

type ProfileListRequest struct {
	PageNumber         uint32  `protobuf:"varint,1,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
	PageSize           uint32  `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	Order              string  `protobuf:"bytes,3,opt,name=order,proto3" json:"order,omitempty"`
	ExcludeSoftDeleted bool    `protobuf:"varint,4,opt,name=exclude_soft_deleted,json=excludeSoftDeleted,proto3" json:"exclude_soft_deleted,omitempty"`
	SoftDeletedOnly    bool    `protobuf:"varint,5,opt,name=soft_deleted_only,json=softDeletedOnly,proto3" json:"soft_deleted_only,omitempty"`
	Gender             Genders `protobuf:"varint,6,opt,name=gender,proto3,enum=grpc.gomeetexamples.profile.Genders" json:"gender,omitempty"`
}

ProfileListRequest encodes a set of criteria for the retrieval of a list of profiles.

func NewPopulatedProfileListRequest

func NewPopulatedProfileListRequest(r randyProfile, easy bool) *ProfileListRequest

func NewProfileListRequestGomeetFaker

func NewProfileListRequestGomeetFaker() *ProfileListRequest

func (*ProfileListRequest) Descriptor

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

func (*ProfileListRequest) Equal

func (this *ProfileListRequest) Equal(that interface{}) bool

func (*ProfileListRequest) GetExcludeSoftDeleted

func (m *ProfileListRequest) GetExcludeSoftDeleted() bool

func (*ProfileListRequest) GetGender

func (m *ProfileListRequest) GetGender() Genders

func (*ProfileListRequest) GetOrder

func (m *ProfileListRequest) GetOrder() string

func (*ProfileListRequest) GetPageNumber

func (m *ProfileListRequest) GetPageNumber() uint32

func (*ProfileListRequest) GetPageSize

func (m *ProfileListRequest) GetPageSize() uint32

func (*ProfileListRequest) GetSoftDeletedOnly

func (m *ProfileListRequest) GetSoftDeletedOnly() bool

func (*ProfileListRequest) ProtoMessage

func (*ProfileListRequest) ProtoMessage()

func (*ProfileListRequest) Reset

func (m *ProfileListRequest) Reset()

func (*ProfileListRequest) String

func (m *ProfileListRequest) String() string

func (*ProfileListRequest) Validate

func (this *ProfileListRequest) Validate() error

type ProfileRequest

type ProfileRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
}

ProfileRequest encodes a profile identifier.

func NewPopulatedProfileRequest

func NewPopulatedProfileRequest(r randyProfile, easy bool) *ProfileRequest

func NewProfileRequestGomeetFaker

func NewProfileRequestGomeetFaker() *ProfileRequest

func (*ProfileRequest) Descriptor

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

func (*ProfileRequest) Equal

func (this *ProfileRequest) Equal(that interface{}) bool

func (*ProfileRequest) GetUuid

func (m *ProfileRequest) GetUuid() string

func (*ProfileRequest) ProtoMessage

func (*ProfileRequest) ProtoMessage()

func (*ProfileRequest) Reset

func (m *ProfileRequest) Reset()

func (*ProfileRequest) String

func (m *ProfileRequest) String() string

func (*ProfileRequest) Validate

func (this *ProfileRequest) Validate() error

type ProfileResponse

type ProfileResponse struct {
	Ok   bool         `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Info *ProfileInfo `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"`
}

ProfileResponse encodes the result of a profile operation.

func NewPopulatedProfileResponse

func NewPopulatedProfileResponse(r randyProfile, easy bool) *ProfileResponse

func NewProfileResponseGomeetFaker

func NewProfileResponseGomeetFaker() *ProfileResponse

func (*ProfileResponse) Descriptor

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

func (*ProfileResponse) Equal

func (this *ProfileResponse) Equal(that interface{}) bool

func (*ProfileResponse) GetInfo

func (m *ProfileResponse) GetInfo() *ProfileInfo

func (*ProfileResponse) GetOk

func (m *ProfileResponse) GetOk() bool

func (*ProfileResponse) ProtoMessage

func (*ProfileResponse) ProtoMessage()

func (*ProfileResponse) Reset

func (m *ProfileResponse) Reset()

func (*ProfileResponse) String

func (m *ProfileResponse) String() string

func (*ProfileResponse) Validate

func (this *ProfileResponse) Validate() error

type ProfileResponseLight

type ProfileResponseLight struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
}

ProfileResponseLight encodes the result of a profile operation.

func NewPopulatedProfileResponseLight

func NewPopulatedProfileResponseLight(r randyProfile, easy bool) *ProfileResponseLight

func NewProfileResponseLightGomeetFaker

func NewProfileResponseLightGomeetFaker() *ProfileResponseLight

func (*ProfileResponseLight) Descriptor

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

func (*ProfileResponseLight) Equal

func (this *ProfileResponseLight) Equal(that interface{}) bool

func (*ProfileResponseLight) GetOk

func (m *ProfileResponseLight) GetOk() bool

func (*ProfileResponseLight) ProtoMessage

func (*ProfileResponseLight) ProtoMessage()

func (*ProfileResponseLight) Reset

func (m *ProfileResponseLight) Reset()

func (*ProfileResponseLight) String

func (m *ProfileResponseLight) String() string

func (*ProfileResponseLight) Validate

func (this *ProfileResponseLight) Validate() error

type ProfileServer

type ProfileServer interface {
	// Version method receives no paramaters and returns a version message.
	Version(context.Context, *EmptyMessage) (*VersionResponse, error)
	// ServicesStatus method receives no paramaters and returns all services status message
	ServicesStatus(context.Context, *EmptyMessage) (*ServicesStatusList, error)
	// Create attempts to create a new profile.
	Create(context.Context, *ProfileCreationRequest) (*ProfileResponse, error)
	// Read returns information about an existing profile.
	Read(context.Context, *ProfileRequest) (*ProfileInfo, error)
	// List returns a list of profiles matching a set of criteria.
	List(context.Context, *ProfileListRequest) (*ProfileList, error)
	// Update attempts to update an existing profile.
	Update(context.Context, *ProfileInfo) (*ProfileResponse, error)
	// SoftDelete attempts to delete an existing profile logically.
	SoftDelete(context.Context, *ProfileRequest) (*ProfileResponse, error)
	// HardDelete attempts to delete an existing profile physically.
	HardDelete(context.Context, *ProfileRequest) (*ProfileResponseLight, error)
}

type ServiceStatus

type ServiceStatus struct {
	Name    string               `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version string               `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Status  ServiceStatus_Status `protobuf:"varint,3,opt,name=status,proto3,enum=grpc.gomeetexamples.profile.ServiceStatus_Status" json:"status,omitempty"`
	EMsg    string               `protobuf:"bytes,4,opt,name=e_msg,json=eMsg,proto3" json:"e_msg,omitempty"`
}

SeviceStatus represents a sub services status message

func NewPopulatedServiceStatus

func NewPopulatedServiceStatus(r randyProfile, easy bool) *ServiceStatus

func NewServiceStatusGomeetFaker

func NewServiceStatusGomeetFaker() *ServiceStatus

func (*ServiceStatus) Descriptor

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

func (*ServiceStatus) Equal

func (this *ServiceStatus) Equal(that interface{}) bool

func (*ServiceStatus) GetEMsg

func (m *ServiceStatus) GetEMsg() string

func (*ServiceStatus) GetName

func (m *ServiceStatus) GetName() string

func (*ServiceStatus) GetStatus

func (m *ServiceStatus) GetStatus() ServiceStatus_Status

func (*ServiceStatus) GetVersion

func (m *ServiceStatus) GetVersion() string

func (*ServiceStatus) ProtoMessage

func (*ServiceStatus) ProtoMessage()

func (*ServiceStatus) Reset

func (m *ServiceStatus) Reset()

func (*ServiceStatus) String

func (m *ServiceStatus) String() string

func (*ServiceStatus) Validate

func (this *ServiceStatus) Validate() error

type ServiceStatus_Status

type ServiceStatus_Status int32
const (
	ServiceStatus_OK          ServiceStatus_Status = 0
	ServiceStatus_UNAVAILABLE ServiceStatus_Status = 1
)

func (ServiceStatus_Status) EnumDescriptor

func (ServiceStatus_Status) EnumDescriptor() ([]byte, []int)

func (ServiceStatus_Status) String

func (x ServiceStatus_Status) String() string

type ServicesStatusList

type ServicesStatusList struct {
	Services []*ServiceStatus `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"`
}

ServicesStatusList is the sub services status list

func NewPopulatedServicesStatusList

func NewPopulatedServicesStatusList(r randyProfile, easy bool) *ServicesStatusList

func NewServicesStatusListGomeetFaker

func NewServicesStatusListGomeetFaker() *ServicesStatusList

func (*ServicesStatusList) Descriptor

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

func (*ServicesStatusList) Equal

func (this *ServicesStatusList) Equal(that interface{}) bool

func (*ServicesStatusList) GetServices

func (m *ServicesStatusList) GetServices() []*ServiceStatus

func (*ServicesStatusList) ProtoMessage

func (*ServicesStatusList) ProtoMessage()

func (*ServicesStatusList) Reset

func (m *ServicesStatusList) Reset()

func (*ServicesStatusList) String

func (m *ServicesStatusList) String() string

func (*ServicesStatusList) Validate

func (this *ServicesStatusList) Validate() error

type VersionResponse

type VersionResponse struct {
	// Id represents the message identifier.
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
}

VersionMessage represents a version message

func NewPopulatedVersionResponse

func NewPopulatedVersionResponse(r randyProfile, easy bool) *VersionResponse

func NewVersionResponseGomeetFaker

func NewVersionResponseGomeetFaker() *VersionResponse

func (*VersionResponse) Descriptor

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

func (*VersionResponse) Equal

func (this *VersionResponse) Equal(that interface{}) bool

func (*VersionResponse) GetName

func (m *VersionResponse) GetName() string

func (*VersionResponse) GetVersion

func (m *VersionResponse) GetVersion() string

func (*VersionResponse) ProtoMessage

func (*VersionResponse) ProtoMessage()

func (*VersionResponse) Reset

func (m *VersionResponse) Reset()

func (*VersionResponse) String

func (m *VersionResponse) String() string

func (*VersionResponse) Validate

func (this *VersionResponse) Validate() error

Directories

Path Synopsis
This simple executable tool is used by go generate Code generated by protoc-gen-gomeet-service.
This simple executable tool is used by go generate Code generated by protoc-gen-gomeet-service.

Jump to

Keyboard shortcuts

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