user

package
v0.0.0-...-3544c3d Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package user is a generated protocol buffer package.

It is generated from these files:

pkg/protobuf/user/user.proto

It has these top-level messages:

LoginRequest
LoginResponse
SetPasswordRequest
DeleteRequest
CreateRequest
Empty

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServer

func RegisterUserServer(s *grpc.Server, srv UserServer)

Types

type CreateRequest

type CreateRequest struct {
	Name     string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Email    string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"`
	Password string `protobuf:"bytes,3,opt,name=password" json:"password,omitempty"`
	Admin    bool   `protobuf:"varint,4,opt,name=admin" json:"admin,omitempty"`
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) GetAdmin

func (m *CreateRequest) GetAdmin() bool

func (*CreateRequest) GetEmail

func (m *CreateRequest) GetEmail() string

func (*CreateRequest) GetName

func (m *CreateRequest) GetName() string

func (*CreateRequest) GetPassword

func (m *CreateRequest) GetPassword() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) String

func (m *CreateRequest) String() string

type DeleteRequest

type DeleteRequest struct {
	Email string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
}

func (*DeleteRequest) Descriptor

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

func (*DeleteRequest) GetEmail

func (m *DeleteRequest) GetEmail() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

type Empty

type Empty struct {
}

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 LoginRequest

type LoginRequest struct {
	Email     string  `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"`
	Password  string  `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
	ExpiresIn float64 `protobuf:"fixed64,3,opt,name=expires_in,json=expiresIn" json:"expires_in,omitempty"`
}

func (*LoginRequest) Descriptor

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

func (*LoginRequest) GetEmail

func (m *LoginRequest) GetEmail() string

func (*LoginRequest) GetExpiresIn

func (m *LoginRequest) GetExpiresIn() float64

func (*LoginRequest) GetPassword

func (m *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) Reset

func (m *LoginRequest) Reset()

func (*LoginRequest) String

func (m *LoginRequest) String() string

type LoginResponse

type LoginResponse struct {
	Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}

func (*LoginResponse) Descriptor

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

func (*LoginResponse) GetToken

func (m *LoginResponse) GetToken() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) Reset

func (m *LoginResponse) Reset()

func (*LoginResponse) String

func (m *LoginResponse) String() string

type SetPasswordRequest

type SetPasswordRequest struct {
	Password string `protobuf:"bytes,1,opt,name=password" json:"password,omitempty"`
	User     string `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
}

func (*SetPasswordRequest) Descriptor

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

func (*SetPasswordRequest) GetPassword

func (m *SetPasswordRequest) GetPassword() string

func (*SetPasswordRequest) GetUser

func (m *SetPasswordRequest) GetUser() string

func (*SetPasswordRequest) ProtoMessage

func (*SetPasswordRequest) ProtoMessage()

func (*SetPasswordRequest) Reset

func (m *SetPasswordRequest) Reset()

func (*SetPasswordRequest) String

func (m *SetPasswordRequest) String() string

type UserClient

type UserClient interface {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*Empty, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error)
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*Empty, error)
}

func NewUserClient

func NewUserClient(cc *grpc.ClientConn) UserClient

type UserServer

type UserServer interface {
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	SetPassword(context.Context, *SetPasswordRequest) (*Empty, error)
	Delete(context.Context, *DeleteRequest) (*Empty, error)
	Create(context.Context, *CreateRequest) (*Empty, error)
}

Jump to

Keyboard shortcuts

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