pb

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2018 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

pb/user.proto

It has these top-level messages:

User
Friends
SliceStringParam
FriendsReq
Empty

This file is generated by protoc-gen-persist Source File: pb/user.proto DO NOT EDIT !

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyToUServPersistType

func EmptyToUServPersistType(req *Empty) (*persist_lib.EmptyForUServ, error)

func FriendsReqToUServPersistType

func FriendsReqToUServPersistType(req *FriendsReq) (*persist_lib.FriendsReqForUServ, error)

func IterUServEmptyProto

func IterUServEmptyProto(iter *persist_lib.Result, next func(i *Empty) error) error

func IterUServUserProto

func IterUServUserProto(iter *persist_lib.Result, next func(i *User) error) error

func RegisterUServServer

func RegisterUServServer(s *grpc.Server, srv UServServer)

func UserToUServPersistType

func UserToUServPersistType(req *User) (*persist_lib.UserForUServ, error)

Types

type Empty

type Empty struct {
}

func EmptyFromUServDatabaseRow

func EmptyFromUServDatabaseRow(row persist_lib.Scanable) (*Empty, error)

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

type Friends

type Friends struct {
	Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
}

func (*Friends) Descriptor

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

func (*Friends) GetNames

func (m *Friends) GetNames() []string

func (*Friends) ProtoMessage

func (*Friends) ProtoMessage()

func (*Friends) Reset

func (m *Friends) Reset()

func (*Friends) String

func (m *Friends) String() string

type FriendsReq

type FriendsReq struct {
	Names *SliceStringParam `protobuf:"bytes,2,opt,name=names" json:"names,omitempty"`
}

func (*FriendsReq) Descriptor

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

func (*FriendsReq) GetNames

func (m *FriendsReq) GetNames() *SliceStringParam

func (*FriendsReq) ProtoMessage

func (*FriendsReq) ProtoMessage()

func (*FriendsReq) Reset

func (m *FriendsReq) Reset()

func (*FriendsReq) String

func (m *FriendsReq) String() string

type RestOfUServHandlers

type RestOfUServHandlers interface {
	UpdateAllNames(req *Empty, stream UServ_UpdateAllNamesServer) error
}

type SliceStringConverter

type SliceStringConverter struct {
	// contains filtered or unexported fields
}

func (*SliceStringConverter) Scan

func (s *SliceStringConverter) Scan(src interface{}) error

func (SliceStringConverter) ToProto

func (SliceStringConverter) ToSql

func (*SliceStringConverter) Value

func (s *SliceStringConverter) Value() (driver.Value, error)

type SliceStringParam

type SliceStringParam struct {
	Slice []string `protobuf:"bytes,1,rep,name=slice" json:"slice,omitempty"`
}

func (*SliceStringParam) Descriptor

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

func (*SliceStringParam) GetSlice

func (m *SliceStringParam) GetSlice() []string

func (*SliceStringParam) ProtoMessage

func (*SliceStringParam) ProtoMessage()

func (*SliceStringParam) Reset

func (m *SliceStringParam) Reset()

func (*SliceStringParam) String

func (m *SliceStringParam) String() string

type TimeString

type TimeString struct {
	// contains filtered or unexported fields
}

func (*TimeString) Scan

func (t *TimeString) Scan(src interface{}) error

func (TimeString) ToProto

func (ts TimeString) ToProto() *timestamp.Timestamp

func (TimeString) ToSql

func (ts TimeString) ToSql(t *timestamp.Timestamp) *TimeString

func (*TimeString) Value

func (t *TimeString) Value() (driver.Value, error)

type UServClient

type UServClient interface {
	CreateTable(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	InsertUsers(ctx context.Context, opts ...grpc.CallOption) (UServ_InsertUsersClient, error)
	GetAllUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (UServ_GetAllUsersClient, error)
	SelectUserById(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
	UpdateUserNames(ctx context.Context, opts ...grpc.CallOption) (UServ_UpdateUserNamesClient, error)
	UpdateNameToFoo(ctx context.Context, in *User, opts ...grpc.CallOption) (*Empty, error)
	UpdateAllNames(ctx context.Context, in *Empty, opts ...grpc.CallOption) (UServ_UpdateAllNamesClient, error)
	GetFriends(ctx context.Context, in *FriendsReq, opts ...grpc.CallOption) (UServ_GetFriendsClient, error)
	DropTable(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
}

func NewUServClient

func NewUServClient(cc *grpc.ClientConn) UServClient

type UServHooks

type UServHooks interface {
	UServInsertUsersBeforeHook(*User) (*Empty, error)
	UServInsertUsersAfterHook(*User, *Empty) error
	UServGetAllUsersBeforeHook(*Empty) ([]*User, error)
	UServGetAllUsersAfterHook(*Empty, *User) error
}

type UServImpl

type UServImpl struct {
	PERSIST   *persist_lib.UServMethodReceiver
	FORWARDED RestOfUServHandlers
	HOOKS     UServHooks
}

func (*UServImpl) CreateTable

func (s *UServImpl) CreateTable(ctx context.Context, req *Empty) (*Empty, error)

func (*UServImpl) DropTable

func (s *UServImpl) DropTable(ctx context.Context, req *Empty) (*Empty, error)

func (*UServImpl) GetAllUsers

func (s *UServImpl) GetAllUsers(req *Empty, stream UServ_GetAllUsersServer) error

func (*UServImpl) GetFriends

func (s *UServImpl) GetFriends(req *FriendsReq, stream UServ_GetFriendsServer) error

func (*UServImpl) InsertUsers

func (s *UServImpl) InsertUsers(stream UServ_InsertUsersServer) error

func (*UServImpl) SelectUserById

func (s *UServImpl) SelectUserById(ctx context.Context, req *User) (*User, error)

func (*UServImpl) UpdateAllNames

func (s *UServImpl) UpdateAllNames(req *Empty, stream UServ_UpdateAllNamesServer) error

func (*UServImpl) UpdateNameToFoo

func (s *UServImpl) UpdateNameToFoo(ctx context.Context, req *User) (*Empty, error)

func (*UServImpl) UpdateUserNames

func (s *UServImpl) UpdateUserNames(stream UServ_UpdateUserNamesServer) error

type UServImplBuilder

type UServImplBuilder struct {
	// contains filtered or unexported fields
}

func NewUServBuilder

func NewUServBuilder() *UServImplBuilder

func (*UServImplBuilder) Build

func (b *UServImplBuilder) Build() (*UServImpl, error)

func (*UServImplBuilder) MustBuild

func (b *UServImplBuilder) MustBuild() *UServImpl

func (*UServImplBuilder) WithDefaultQueryHandlers

func (b *UServImplBuilder) WithDefaultQueryHandlers() *UServImplBuilder

func (*UServImplBuilder) WithHooks

func (b *UServImplBuilder) WithHooks(hs UServHooks) *UServImplBuilder

func (*UServImplBuilder) WithNewSqlDb

func (b *UServImplBuilder) WithNewSqlDb(driverName, dataSourceName string) *UServImplBuilder

func (*UServImplBuilder) WithNilAsDefaultQueryHandlers

func (b *UServImplBuilder) WithNilAsDefaultQueryHandlers(p *persist_lib.UServQueryHandlers) *UServImplBuilder

func (*UServImplBuilder) WithPersistQueryHandlers

func (b *UServImplBuilder) WithPersistQueryHandlers(p *persist_lib.UServQueryHandlers) *UServImplBuilder

func (*UServImplBuilder) WithRestOfGrpcHandlers

func (b *UServImplBuilder) WithRestOfGrpcHandlers(r RestOfUServHandlers) *UServImplBuilder

func (*UServImplBuilder) WithSqlClient

func (b *UServImplBuilder) WithSqlClient(c *sql.DB) *UServImplBuilder

type UServServer

type UServServer interface {
	CreateTable(context.Context, *Empty) (*Empty, error)
	InsertUsers(UServ_InsertUsersServer) error
	GetAllUsers(*Empty, UServ_GetAllUsersServer) error
	SelectUserById(context.Context, *User) (*User, error)
	UpdateUserNames(UServ_UpdateUserNamesServer) error
	UpdateNameToFoo(context.Context, *User) (*Empty, error)
	UpdateAllNames(*Empty, UServ_UpdateAllNamesServer) error
	GetFriends(*FriendsReq, UServ_GetFriendsServer) error
	DropTable(context.Context, *Empty) (*Empty, error)
}

type UServ_GetAllUsersClient

type UServ_GetAllUsersClient interface {
	Recv() (*User, error)
	grpc.ClientStream
}

type UServ_GetAllUsersServer

type UServ_GetAllUsersServer interface {
	Send(*User) error
	grpc.ServerStream
}

type UServ_GetFriendsClient

type UServ_GetFriendsClient interface {
	Recv() (*User, error)
	grpc.ClientStream
}

type UServ_GetFriendsServer

type UServ_GetFriendsServer interface {
	Send(*User) error
	grpc.ServerStream
}

type UServ_InsertUsersClient

type UServ_InsertUsersClient interface {
	Send(*User) error
	CloseAndRecv() (*Empty, error)
	grpc.ClientStream
}

type UServ_InsertUsersServer

type UServ_InsertUsersServer interface {
	SendAndClose(*Empty) error
	Recv() (*User, error)
	grpc.ServerStream
}

type UServ_UpdateAllNamesClient

type UServ_UpdateAllNamesClient interface {
	Recv() (*User, error)
	grpc.ClientStream
}

type UServ_UpdateAllNamesServer

type UServ_UpdateAllNamesServer interface {
	Send(*User) error
	grpc.ServerStream
}

type UServ_UpdateUserNamesClient

type UServ_UpdateUserNamesClient interface {
	Send(*User) error
	Recv() (*User, error)
	grpc.ClientStream
}

type UServ_UpdateUserNamesServer

type UServ_UpdateUserNamesServer interface {
	Send(*User) error
	Recv() (*User, error)
	grpc.ServerStream
}

type User

type User struct {
	Id        int64                       `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name      string                      `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Friends   *Friends                    `protobuf:"bytes,3,opt,name=friends" json:"friends,omitempty"`
	CreatedOn *google_protobuf1.Timestamp `protobuf:"bytes,4,opt,name=created_on,json=createdOn" json:"created_on,omitempty"`
}

func IncId

func IncId(u *User) ([]*User, error)

func UserFromUServDatabaseRow

func UserFromUServDatabaseRow(row persist_lib.Scanable) (*User, error)

func (*User) Descriptor

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

func (*User) GetCreatedOn

func (m *User) GetCreatedOn() *google_protobuf1.Timestamp

func (*User) GetFriends

func (m *User) GetFriends() *Friends

func (*User) GetId

func (m *User) GetId() int64

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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