user

package
v0.0.0-...-c7ad020 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 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:

user.proto

It has these top-level messages:

GetEntriesRequest
GetEntriesResponse
ApproveEntriesRequest
ApproveEntriesResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServer

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

Types

type ApproveEntriesRequest

type ApproveEntriesRequest struct {
	AuthToken  string                            `protobuf:"bytes,1,opt,name=auth_token,json=authToken" json:"auth_token,omitempty"`
	Categories []*ApproveEntriesRequest_Category `protobuf:"bytes,3,rep,name=categories" json:"categories,omitempty"`
	Questions  []*ApproveEntriesRequest_Question `protobuf:"bytes,4,rep,name=questions" json:"questions,omitempty"`
}

func (*ApproveEntriesRequest) Descriptor

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

func (*ApproveEntriesRequest) GetAuthToken

func (m *ApproveEntriesRequest) GetAuthToken() string

func (*ApproveEntriesRequest) GetCategories

func (*ApproveEntriesRequest) GetQuestions

func (*ApproveEntriesRequest) ProtoMessage

func (*ApproveEntriesRequest) ProtoMessage()

func (*ApproveEntriesRequest) Reset

func (m *ApproveEntriesRequest) Reset()

func (*ApproveEntriesRequest) String

func (m *ApproveEntriesRequest) String() string

type ApproveEntriesRequest_Category

type ApproveEntriesRequest_Category struct {
	Id       int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Approved bool  `protobuf:"varint,2,opt,name=approved" json:"approved,omitempty"`
}

func (*ApproveEntriesRequest_Category) Descriptor

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

func (*ApproveEntriesRequest_Category) GetApproved

func (m *ApproveEntriesRequest_Category) GetApproved() bool

func (*ApproveEntriesRequest_Category) GetId

func (*ApproveEntriesRequest_Category) ProtoMessage

func (*ApproveEntriesRequest_Category) ProtoMessage()

func (*ApproveEntriesRequest_Category) Reset

func (m *ApproveEntriesRequest_Category) Reset()

func (*ApproveEntriesRequest_Category) String

type ApproveEntriesRequest_Question

type ApproveEntriesRequest_Question struct {
	Id       int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Approved bool  `protobuf:"varint,2,opt,name=approved" json:"approved,omitempty"`
}

func (*ApproveEntriesRequest_Question) Descriptor

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

func (*ApproveEntriesRequest_Question) GetApproved

func (m *ApproveEntriesRequest_Question) GetApproved() bool

func (*ApproveEntriesRequest_Question) GetId

func (*ApproveEntriesRequest_Question) ProtoMessage

func (*ApproveEntriesRequest_Question) ProtoMessage()

func (*ApproveEntriesRequest_Question) Reset

func (m *ApproveEntriesRequest_Question) Reset()

func (*ApproveEntriesRequest_Question) String

type ApproveEntriesResponse

type ApproveEntriesResponse struct {
	Status     string                             `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Message    string                             `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	Categories []*ApproveEntriesResponse_Category `protobuf:"bytes,3,rep,name=categories" json:"categories,omitempty"`
	Questions  []*ApproveEntriesResponse_Question `protobuf:"bytes,4,rep,name=questions" json:"questions,omitempty"`
}

func (*ApproveEntriesResponse) Descriptor

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

func (*ApproveEntriesResponse) GetCategories

func (*ApproveEntriesResponse) GetMessage

func (m *ApproveEntriesResponse) GetMessage() string

func (*ApproveEntriesResponse) GetQuestions

func (*ApproveEntriesResponse) GetStatus

func (m *ApproveEntriesResponse) GetStatus() string

func (*ApproveEntriesResponse) ProtoMessage

func (*ApproveEntriesResponse) ProtoMessage()

func (*ApproveEntriesResponse) Reset

func (m *ApproveEntriesResponse) Reset()

func (*ApproveEntriesResponse) String

func (m *ApproveEntriesResponse) String() string

type ApproveEntriesResponse_Category

type ApproveEntriesResponse_Category struct {
	Id          int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	WeightRange string `protobuf:"bytes,3,opt,name=weight_range,json=weightRange" json:"weight_range,omitempty"`
	Parent      int32  `protobuf:"varint,4,opt,name=parent" json:"parent,omitempty"`
	Level       int32  `protobuf:"varint,5,opt,name=level" json:"level,omitempty"`
}

func (*ApproveEntriesResponse_Category) Descriptor

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

func (*ApproveEntriesResponse_Category) GetId

func (*ApproveEntriesResponse_Category) GetLevel

func (m *ApproveEntriesResponse_Category) GetLevel() int32

func (*ApproveEntriesResponse_Category) GetName

func (*ApproveEntriesResponse_Category) GetParent

func (m *ApproveEntriesResponse_Category) GetParent() int32

func (*ApproveEntriesResponse_Category) GetWeightRange

func (m *ApproveEntriesResponse_Category) GetWeightRange() string

func (*ApproveEntriesResponse_Category) ProtoMessage

func (*ApproveEntriesResponse_Category) ProtoMessage()

func (*ApproveEntriesResponse_Category) Reset

func (*ApproveEntriesResponse_Category) String

type ApproveEntriesResponse_Question

type ApproveEntriesResponse_Question struct {
	Id     int32                                   `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Title  string                                  `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
	Body   string                                  `protobuf:"bytes,3,opt,name=body" json:"body,omitempty"`
	Answer *ApproveEntriesResponse_Question_Answer `protobuf:"bytes,4,opt,name=answer" json:"answer,omitempty"`
}

func (*ApproveEntriesResponse_Question) Descriptor

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

func (*ApproveEntriesResponse_Question) GetAnswer

func (*ApproveEntriesResponse_Question) GetBody

func (*ApproveEntriesResponse_Question) GetId

func (*ApproveEntriesResponse_Question) GetTitle

func (*ApproveEntriesResponse_Question) ProtoMessage

func (*ApproveEntriesResponse_Question) ProtoMessage()

func (*ApproveEntriesResponse_Question) Reset

func (*ApproveEntriesResponse_Question) String

type ApproveEntriesResponse_Question_Answer

type ApproveEntriesResponse_Question_Answer struct {
	Option1 string `protobuf:"bytes,1,opt,name=option1" json:"option1,omitempty"`
	Option2 string `protobuf:"bytes,2,opt,name=option2" json:"option2,omitempty"`
	Option3 string `protobuf:"bytes,3,opt,name=option3" json:"option3,omitempty"`
	Option4 string `protobuf:"bytes,4,opt,name=option4" json:"option4,omitempty"`
	Option5 string `protobuf:"bytes,5,opt,name=option5" json:"option5,omitempty"`
}

func (*ApproveEntriesResponse_Question_Answer) Descriptor

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

func (*ApproveEntriesResponse_Question_Answer) GetOption1

func (*ApproveEntriesResponse_Question_Answer) GetOption2

func (*ApproveEntriesResponse_Question_Answer) GetOption3

func (*ApproveEntriesResponse_Question_Answer) GetOption4

func (*ApproveEntriesResponse_Question_Answer) GetOption5

func (*ApproveEntriesResponse_Question_Answer) ProtoMessage

func (*ApproveEntriesResponse_Question_Answer) Reset

func (*ApproveEntriesResponse_Question_Answer) String

type GetEntriesRequest

type GetEntriesRequest struct {
	AuthToken string `protobuf:"bytes,1,opt,name=auth_token,json=authToken" json:"auth_token,omitempty"`
}

func (*GetEntriesRequest) Descriptor

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

func (*GetEntriesRequest) GetAuthToken

func (m *GetEntriesRequest) GetAuthToken() string

func (*GetEntriesRequest) ProtoMessage

func (*GetEntriesRequest) ProtoMessage()

func (*GetEntriesRequest) Reset

func (m *GetEntriesRequest) Reset()

func (*GetEntriesRequest) String

func (m *GetEntriesRequest) String() string

type GetEntriesResponse

type GetEntriesResponse struct {
	Status     string                         `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Message    string                         `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	Categories []*GetEntriesResponse_Category `protobuf:"bytes,3,rep,name=categories" json:"categories,omitempty"`
	Questions  []*GetEntriesResponse_Question `protobuf:"bytes,4,rep,name=questions" json:"questions,omitempty"`
	Role       string                         `protobuf:"bytes,5,opt,name=role" json:"role,omitempty"`
}

func (*GetEntriesResponse) Descriptor

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

func (*GetEntriesResponse) GetCategories

func (m *GetEntriesResponse) GetCategories() []*GetEntriesResponse_Category

func (*GetEntriesResponse) GetMessage

func (m *GetEntriesResponse) GetMessage() string

func (*GetEntriesResponse) GetQuestions

func (m *GetEntriesResponse) GetQuestions() []*GetEntriesResponse_Question

func (*GetEntriesResponse) GetRole

func (m *GetEntriesResponse) GetRole() string

func (*GetEntriesResponse) GetStatus

func (m *GetEntriesResponse) GetStatus() string

func (*GetEntriesResponse) ProtoMessage

func (*GetEntriesResponse) ProtoMessage()

func (*GetEntriesResponse) Reset

func (m *GetEntriesResponse) Reset()

func (*GetEntriesResponse) String

func (m *GetEntriesResponse) String() string

type GetEntriesResponse_Category

type GetEntriesResponse_Category struct {
	Id          int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	WeightRange string `protobuf:"bytes,3,opt,name=weight_range,json=weightRange" json:"weight_range,omitempty"`
	Parent      int32  `protobuf:"varint,4,opt,name=parent" json:"parent,omitempty"`
	Level       int32  `protobuf:"varint,5,opt,name=level" json:"level,omitempty"`
}

func (*GetEntriesResponse_Category) Descriptor

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

func (*GetEntriesResponse_Category) GetId

func (*GetEntriesResponse_Category) GetLevel

func (m *GetEntriesResponse_Category) GetLevel() int32

func (*GetEntriesResponse_Category) GetName

func (m *GetEntriesResponse_Category) GetName() string

func (*GetEntriesResponse_Category) GetParent

func (m *GetEntriesResponse_Category) GetParent() int32

func (*GetEntriesResponse_Category) GetWeightRange

func (m *GetEntriesResponse_Category) GetWeightRange() string

func (*GetEntriesResponse_Category) ProtoMessage

func (*GetEntriesResponse_Category) ProtoMessage()

func (*GetEntriesResponse_Category) Reset

func (m *GetEntriesResponse_Category) Reset()

func (*GetEntriesResponse_Category) String

func (m *GetEntriesResponse_Category) String() string

type GetEntriesResponse_Question

type GetEntriesResponse_Question struct {
	Id     int32                               `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Title  string                              `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
	Body   string                              `protobuf:"bytes,3,opt,name=body" json:"body,omitempty"`
	Answer *GetEntriesResponse_Question_Answer `protobuf:"bytes,4,opt,name=answer" json:"answer,omitempty"`
}

func (*GetEntriesResponse_Question) Descriptor

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

func (*GetEntriesResponse_Question) GetAnswer

func (*GetEntriesResponse_Question) GetBody

func (m *GetEntriesResponse_Question) GetBody() string

func (*GetEntriesResponse_Question) GetId

func (*GetEntriesResponse_Question) GetTitle

func (m *GetEntriesResponse_Question) GetTitle() string

func (*GetEntriesResponse_Question) ProtoMessage

func (*GetEntriesResponse_Question) ProtoMessage()

func (*GetEntriesResponse_Question) Reset

func (m *GetEntriesResponse_Question) Reset()

func (*GetEntriesResponse_Question) String

func (m *GetEntriesResponse_Question) String() string

type GetEntriesResponse_Question_Answer

type GetEntriesResponse_Question_Answer struct {
	Option1 string `protobuf:"bytes,1,opt,name=option1" json:"option1,omitempty"`
	Option2 string `protobuf:"bytes,2,opt,name=option2" json:"option2,omitempty"`
	Option3 string `protobuf:"bytes,3,opt,name=option3" json:"option3,omitempty"`
	Option4 string `protobuf:"bytes,4,opt,name=option4" json:"option4,omitempty"`
	Option5 string `protobuf:"bytes,5,opt,name=option5" json:"option5,omitempty"`
}

func (*GetEntriesResponse_Question_Answer) Descriptor

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

func (*GetEntriesResponse_Question_Answer) GetOption1

func (*GetEntriesResponse_Question_Answer) GetOption2

func (*GetEntriesResponse_Question_Answer) GetOption3

func (*GetEntriesResponse_Question_Answer) GetOption4

func (*GetEntriesResponse_Question_Answer) GetOption5

func (*GetEntriesResponse_Question_Answer) ProtoMessage

func (*GetEntriesResponse_Question_Answer) ProtoMessage()

func (*GetEntriesResponse_Question_Answer) Reset

func (*GetEntriesResponse_Question_Answer) String

type UserClient

type UserClient interface {
	// Admins can view entries
	GetEntries(ctx context.Context, in *GetEntriesRequest, opts ...grpc.CallOption) (*GetEntriesResponse, error)
	// Admins can approve entries
	ApproveEntries(ctx context.Context, in *ApproveEntriesRequest, opts ...grpc.CallOption) (*ApproveEntriesResponse, error)
}

func NewUserClient

func NewUserClient(cc *grpc.ClientConn) UserClient

type UserServer

type UserServer interface {
	// Admins can view entries
	GetEntries(context.Context, *GetEntriesRequest) (*GetEntriesResponse, error)
	// Admins can approve entries
	ApproveEntries(context.Context, *ApproveEntriesRequest) (*ApproveEntriesResponse, error)
}

Jump to

Keyboard shortcuts

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