kazoku

package
v0.0.0-...-5bbb7b8 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthKazoku = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowKazoku   = fmt.Errorf("proto: integer overflow")
)
View Source
var UserAccount_Role_name = map[int32]string{
	0:  "INACTIVE",
	1:  "MEMBER",
	98: "ADMIN",
	99: "OWNER",
}
View Source
var UserAccount_Role_value = map[string]int32{
	"INACTIVE": 0,
	"MEMBER":   1,
	"ADMIN":    98,
	"OWNER":    99,
}

Functions

func RegisterKazokuServer

func RegisterKazokuServer(s *grpc.Server, srv KazokuServer)

Types

type Account

type Account struct {
	Id              *common.UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"`
	Name            string       `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	CreatedByUserID *common.UUID `protobuf:"bytes,3,opt,name=createdByUserID,proto3" json:"createdByUserID,omitempty"`
	UpdatedByUserID *common.UUID `protobuf:"bytes,4,opt,name=updatedByUserID,proto3" json:"updatedByUserID,omitempty" bson:",omitempty"`
	ExpiresAt       *time.Time   `protobuf:"bytes,5,opt,name=expiresAt,proto3,stdtime" json:"expiresAt,omitempty"`
	CreatedAt       *time.Time   `protobuf:"bytes,6,opt,name=createdAt,proto3,stdtime" json:"createdAt,omitempty"`
	UpdatedAt       *time.Time   `protobuf:"bytes,7,opt,name=updatedAt,proto3,stdtime" json:"updatedAt,omitempty" bson:",omitempty"`
	DeletedAt       *time.Time   `protobuf:"bytes,8,opt,name=deletedAt,proto3,stdtime" json:"deletedAt,omitempty" bson:",omitempty"`
}

func (*Account) Descriptor

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

func (*Account) GetCreatedAt

func (m *Account) GetCreatedAt() *time.Time

func (*Account) GetCreatedByUserID

func (m *Account) GetCreatedByUserID() *common.UUID

func (*Account) GetDeletedAt

func (m *Account) GetDeletedAt() *time.Time

func (*Account) GetExpiresAt

func (m *Account) GetExpiresAt() *time.Time

func (*Account) GetId

func (m *Account) GetId() *common.UUID

func (*Account) GetName

func (m *Account) GetName() string

func (*Account) GetUpdatedAt

func (m *Account) GetUpdatedAt() *time.Time

func (*Account) GetUpdatedByUserID

func (m *Account) GetUpdatedByUserID() *common.UUID

func (*Account) Marshal

func (m *Account) Marshal() (dAtA []byte, err error)

func (*Account) MarshalTo

func (m *Account) MarshalTo(dAtA []byte) (int, error)

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) Size

func (m *Account) Size() (n int)

func (*Account) String

func (m *Account) String() string

func (*Account) Unmarshal

func (m *Account) Unmarshal(dAtA []byte) error

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Account) XXX_Merge

func (m *Account) XXX_Merge(src proto.Message)

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

func (m *Account) XXX_Unmarshal(b []byte) error

type Client

type Client struct {
	grpc.Client
	KazokuClient
}

Client is the client for the Kazoku gRPC service.

func NewClient

func NewClient(config *grpc.ClientConfig) *Client

NewClient returns a client to the Kazoku gRPC service.

type KazokuClient

type KazokuClient interface {
	CreateAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error)
	CreateUserAccount(ctx context.Context, in *UserAccount, opts ...grpc.CallOption) (*UserAccount, error)
	GetAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error)
	GetUserAccounts(ctx context.Context, in *UserAccount, opts ...grpc.CallOption) (*UserAccounts, error)
}

KazokuClient is the client API for Kazoku service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewKazokuClient

func NewKazokuClient(cc *grpc.ClientConn) KazokuClient

type KazokuServer

type KazokuServer interface {
	CreateAccount(context.Context, *Account) (*Account, error)
	CreateUserAccount(context.Context, *UserAccount) (*UserAccount, error)
	GetAccount(context.Context, *Account) (*Account, error)
	GetUserAccounts(context.Context, *UserAccount) (*UserAccounts, error)
}

KazokuServer is the server API for Kazoku service.

type UserAccount

type UserAccount struct {
	AccountID       *common.UUID     `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"`
	UserID          *common.UUID     `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
	Role            UserAccount_Role `protobuf:"varint,3,opt,name=role,proto3,enum=kazoku.UserAccount_Role" json:"role,omitempty"`
	CreatedByUserID *common.UUID     `protobuf:"bytes,4,opt,name=createdByUserID,proto3" json:"createdByUserID,omitempty"`
	UpdatedByUserID *common.UUID     `protobuf:"bytes,5,opt,name=updatedByUserID,proto3" json:"updatedByUserID,omitempty" bson:",omitempty"`
	CreatedAt       *time.Time       `protobuf:"bytes,6,opt,name=createdAt,proto3,stdtime" json:"createdAt,omitempty"`
	UpdatedAt       *time.Time       `protobuf:"bytes,7,opt,name=updatedAt,proto3,stdtime" json:"updatedAt,omitempty" bson:",omitempty"`
	DeletedAt       *time.Time       `protobuf:"bytes,8,opt,name=deletedAt,proto3,stdtime" json:"deletedAt,omitempty" bson:",omitempty"`
}

func (*UserAccount) Descriptor

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

func (*UserAccount) GetAccountID

func (m *UserAccount) GetAccountID() *common.UUID

func (*UserAccount) GetCreatedAt

func (m *UserAccount) GetCreatedAt() *time.Time

func (*UserAccount) GetCreatedByUserID

func (m *UserAccount) GetCreatedByUserID() *common.UUID

func (*UserAccount) GetDeletedAt

func (m *UserAccount) GetDeletedAt() *time.Time

func (*UserAccount) GetRole

func (m *UserAccount) GetRole() UserAccount_Role

func (*UserAccount) GetUpdatedAt

func (m *UserAccount) GetUpdatedAt() *time.Time

func (*UserAccount) GetUpdatedByUserID

func (m *UserAccount) GetUpdatedByUserID() *common.UUID

func (*UserAccount) GetUserID

func (m *UserAccount) GetUserID() *common.UUID

func (*UserAccount) Marshal

func (m *UserAccount) Marshal() (dAtA []byte, err error)

func (*UserAccount) MarshalTo

func (m *UserAccount) MarshalTo(dAtA []byte) (int, error)

func (*UserAccount) ProtoMessage

func (*UserAccount) ProtoMessage()

func (*UserAccount) Reset

func (m *UserAccount) Reset()

func (*UserAccount) Size

func (m *UserAccount) Size() (n int)

func (*UserAccount) String

func (m *UserAccount) String() string

func (*UserAccount) Unmarshal

func (m *UserAccount) Unmarshal(dAtA []byte) error

func (*UserAccount) XXX_DiscardUnknown

func (m *UserAccount) XXX_DiscardUnknown()

func (*UserAccount) XXX_Marshal

func (m *UserAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserAccount) XXX_Merge

func (m *UserAccount) XXX_Merge(src proto.Message)

func (*UserAccount) XXX_Size

func (m *UserAccount) XXX_Size() int

func (*UserAccount) XXX_Unmarshal

func (m *UserAccount) XXX_Unmarshal(b []byte) error

type UserAccount_Role

type UserAccount_Role int32
const (
	UserAccount_INACTIVE UserAccount_Role = 0
	UserAccount_MEMBER   UserAccount_Role = 1
	UserAccount_ADMIN    UserAccount_Role = 98
	UserAccount_OWNER    UserAccount_Role = 99
)

func (UserAccount_Role) EnumDescriptor

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

func (UserAccount_Role) MarshalGQL

func (r UserAccount_Role) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler for kazoku.UserAccount_Role.

func (UserAccount_Role) String

func (x UserAccount_Role) String() string

func (*UserAccount_Role) UnmarshalGQL

func (r *UserAccount_Role) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler for kazoku.UserAccount_Role.

type UserAccounts

type UserAccounts struct {
	UserAccounts []*UserAccount `protobuf:"bytes,1,rep,name=userAccounts,proto3" json:"userAccounts,omitempty"`
}

func (*UserAccounts) Descriptor

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

func (*UserAccounts) GetUserAccounts

func (m *UserAccounts) GetUserAccounts() []*UserAccount

func (*UserAccounts) Marshal

func (m *UserAccounts) Marshal() (dAtA []byte, err error)

func (*UserAccounts) MarshalTo

func (m *UserAccounts) MarshalTo(dAtA []byte) (int, error)

func (*UserAccounts) ProtoMessage

func (*UserAccounts) ProtoMessage()

func (*UserAccounts) Reset

func (m *UserAccounts) Reset()

func (*UserAccounts) Size

func (m *UserAccounts) Size() (n int)

func (*UserAccounts) String

func (m *UserAccounts) String() string

func (*UserAccounts) Unmarshal

func (m *UserAccounts) Unmarshal(dAtA []byte) error

func (*UserAccounts) XXX_DiscardUnknown

func (m *UserAccounts) XXX_DiscardUnknown()

func (*UserAccounts) XXX_Marshal

func (m *UserAccounts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserAccounts) XXX_Merge

func (m *UserAccounts) XXX_Merge(src proto.Message)

func (*UserAccounts) XXX_Size

func (m *UserAccounts) XXX_Size() int

func (*UserAccounts) XXX_Unmarshal

func (m *UserAccounts) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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