Documentation
¶
Index ¶
- Variables
- func RegisterSurveyServiceServer(s grpc.ServiceRegistrar, srv SurveyServiceServer)
- type Answer
- func (*Answer) Descriptor() ([]byte, []int)deprecated
- func (x *Answer) GetBool() bool
- func (x *Answer) GetChoices() []string
- func (x *Answer) GetId() string
- func (x *Answer) GetQuestionId() string
- func (x *Answer) GetRating() int32
- func (x *Answer) GetText() string
- func (*Answer) ProtoMessage()
- func (x *Answer) ProtoReflect() protoreflect.Message
- func (x *Answer) Reset()
- func (x *Answer) String() string
- type CreateSurveyRequest
- func (*CreateSurveyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateSurveyRequest) GetAnswers() []*Answer
- func (x *CreateSurveyRequest) GetTemplateId() string
- func (*CreateSurveyRequest) ProtoMessage()
- func (x *CreateSurveyRequest) ProtoReflect() protoreflect.Message
- func (x *CreateSurveyRequest) Reset()
- func (x *CreateSurveyRequest) String() string
- type CreateTemplateRequest
- func (*CreateTemplateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTemplateRequest) GetDescription() string
- func (x *CreateTemplateRequest) GetName() string
- func (x *CreateTemplateRequest) GetQuestions() []*Question
- func (x *CreateTemplateRequest) GetTags() []string
- func (*CreateTemplateRequest) ProtoMessage()
- func (x *CreateTemplateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateTemplateRequest) Reset()
- func (x *CreateTemplateRequest) String() string
- type DeleteSurveyRequest
- func (*DeleteSurveyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteSurveyRequest) GetSurveyId() string
- func (*DeleteSurveyRequest) ProtoMessage()
- func (x *DeleteSurveyRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteSurveyRequest) Reset()
- func (x *DeleteSurveyRequest) String() string
- type DeleteTemplateRequest
- func (*DeleteTemplateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteTemplateRequest) GetTemplateId() string
- func (*DeleteTemplateRequest) ProtoMessage()
- func (x *DeleteTemplateRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteTemplateRequest) Reset()
- func (x *DeleteTemplateRequest) String() string
- type GetSurveyRequest
- type GetTemplateRequest
- type ListSurveysRequest
- func (*ListSurveysRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListSurveysRequest) GetLimit() int64
- func (x *ListSurveysRequest) GetOffset() int64
- func (x *ListSurveysRequest) GetTemplateIds() []string
- func (*ListSurveysRequest) ProtoMessage()
- func (x *ListSurveysRequest) ProtoReflect() protoreflect.Message
- func (x *ListSurveysRequest) Reset()
- func (x *ListSurveysRequest) String() string
- type ListSurveysResponse
- func (*ListSurveysResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListSurveysResponse) GetPageInfo() *PageInfo
- func (x *ListSurveysResponse) GetSurveys() []*Survey
- func (*ListSurveysResponse) ProtoMessage()
- func (x *ListSurveysResponse) ProtoReflect() protoreflect.Message
- func (x *ListSurveysResponse) Reset()
- func (x *ListSurveysResponse) String() string
- type ListTemplatesRequest
- func (*ListTemplatesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListTemplatesRequest) GetLimit() int64
- func (x *ListTemplatesRequest) GetName() string
- func (x *ListTemplatesRequest) GetOffset() int64
- func (x *ListTemplatesRequest) GetSearch() string
- func (x *ListTemplatesRequest) GetTags() []string
- func (*ListTemplatesRequest) ProtoMessage()
- func (x *ListTemplatesRequest) ProtoReflect() protoreflect.Message
- func (x *ListTemplatesRequest) Reset()
- func (x *ListTemplatesRequest) String() string
- type ListTemplatesResponse
- func (*ListTemplatesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListTemplatesResponse) GetPageInfo() *PageInfo
- func (x *ListTemplatesResponse) GetTemplates() []*Template
- func (*ListTemplatesResponse) ProtoMessage()
- func (x *ListTemplatesResponse) ProtoReflect() protoreflect.Message
- func (x *ListTemplatesResponse) Reset()
- func (x *ListTemplatesResponse) String() string
- type PageInfo
- func (*PageInfo) Descriptor() ([]byte, []int)deprecated
- func (x *PageInfo) GetCount() int64
- func (x *PageInfo) GetLimit() int64
- func (x *PageInfo) GetOffset() int64
- func (x *PageInfo) GetTotal() int64
- func (*PageInfo) ProtoMessage()
- func (x *PageInfo) ProtoReflect() protoreflect.Message
- func (x *PageInfo) Reset()
- func (x *PageInfo) String() string
- type Question
- func (*Question) Descriptor() ([]byte, []int)deprecated
- func (x *Question) GetChoices() []string
- func (x *Question) GetCreated() *timestamppb.Timestamp
- func (x *Question) GetId() string
- func (x *Question) GetRequired() bool
- func (x *Question) GetTemplateId() string
- func (x *Question) GetText() string
- func (x *Question) GetType() Question_Type
- func (x *Question) GetUpdated() *timestamppb.Timestamp
- func (*Question) ProtoMessage()
- func (x *Question) ProtoReflect() protoreflect.Message
- func (x *Question) Reset()
- func (x *Question) String() string
- type Question_Type
- func (Question_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Question_Type) Enum() *Question_Type
- func (Question_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Question_Type) Number() protoreflect.EnumNumber
- func (x Question_Type) String() string
- func (Question_Type) Type() protoreflect.EnumType
- type Questions
- type Survey
- func (*Survey) Descriptor() ([]byte, []int)deprecated
- func (x *Survey) GetAnswers() []*Answer
- func (x *Survey) GetCreated() *timestamppb.Timestamp
- func (x *Survey) GetId() string
- func (x *Survey) GetTemplateId() string
- func (*Survey) ProtoMessage()
- func (x *Survey) ProtoReflect() protoreflect.Message
- func (x *Survey) Reset()
- func (x *Survey) String() string
- type SurveyServiceClient
- type SurveyServiceServer
- type Tags
- type Template
- func (*Template) Descriptor() ([]byte, []int)deprecated
- func (x *Template) GetCreated() *timestamppb.Timestamp
- func (x *Template) GetDescription() string
- func (x *Template) GetId() string
- func (x *Template) GetName() string
- func (x *Template) GetQuestions() []*Question
- func (x *Template) GetTags() []string
- func (x *Template) GetUpdated() *timestamppb.Timestamp
- func (*Template) ProtoMessage()
- func (x *Template) ProtoReflect() protoreflect.Message
- func (x *Template) Reset()
- func (x *Template) String() string
- type UnimplementedSurveyServiceServer
- func (UnimplementedSurveyServiceServer) CreateSurvey(context.Context, *CreateSurveyRequest) (*Survey, error)
- func (UnimplementedSurveyServiceServer) CreateTemplate(context.Context, *CreateTemplateRequest) (*Template, error)
- func (UnimplementedSurveyServiceServer) DeleteSurvey(context.Context, *DeleteSurveyRequest) (*emptypb.Empty, error)
- func (UnimplementedSurveyServiceServer) DeleteTemplate(context.Context, *DeleteTemplateRequest) (*emptypb.Empty, error)
- func (UnimplementedSurveyServiceServer) GetSurvey(context.Context, *GetSurveyRequest) (*Survey, error)
- func (UnimplementedSurveyServiceServer) GetTemplate(context.Context, *GetTemplateRequest) (*Template, error)
- func (UnimplementedSurveyServiceServer) ListSurveys(context.Context, *ListSurveysRequest) (*ListSurveysResponse, error)
- func (UnimplementedSurveyServiceServer) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error)
- func (UnimplementedSurveyServiceServer) UpdateTemplate(context.Context, *UpdateTemplateRequest) (*Template, error)
- type UnsafeSurveyServiceServer
- type UpdateTemplateRequest
- func (*UpdateTemplateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateTemplateRequest) GetDescription() string
- func (x *UpdateTemplateRequest) GetName() string
- func (x *UpdateTemplateRequest) GetQuestions() *Questions
- func (x *UpdateTemplateRequest) GetTags() *Tags
- func (x *UpdateTemplateRequest) GetTemplateId() string
- func (*UpdateTemplateRequest) ProtoMessage()
- func (x *UpdateTemplateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateTemplateRequest) Reset()
- func (x *UpdateTemplateRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Question_Type_name = map[int32]string{ 0: "QUESTION_TYPE_NOT_SPECIFIED", 1: "QUESTION_TYPE_TEXT", 2: "QUESTION_TYPE_RATING", 3: "QUESTION_TYPE_BOOL", 4: "QUESTION_TYPE_MULTIPLE_CHOICE", 5: "QUESTION_TYPE_SINGLE_CHOICE", } Question_Type_value = map[string]int32{ "QUESTION_TYPE_NOT_SPECIFIED": 0, "QUESTION_TYPE_TEXT": 1, "QUESTION_TYPE_RATING": 2, "QUESTION_TYPE_BOOL": 3, "QUESTION_TYPE_MULTIPLE_CHOICE": 4, "QUESTION_TYPE_SINGLE_CHOICE": 5, } )
Enum value maps for Question_Type.
var File_survey_proto protoreflect.FileDescriptor
var SurveyService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "survey.SurveyService", HandlerType: (*SurveyServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateTemplate", Handler: _SurveyService_CreateTemplate_Handler, }, { MethodName: "GetTemplate", Handler: _SurveyService_GetTemplate_Handler, }, { MethodName: "ListTemplates", Handler: _SurveyService_ListTemplates_Handler, }, { MethodName: "UpdateTemplate", Handler: _SurveyService_UpdateTemplate_Handler, }, { MethodName: "DeleteTemplate", Handler: _SurveyService_DeleteTemplate_Handler, }, { MethodName: "CreateSurvey", Handler: _SurveyService_CreateSurvey_Handler, }, { MethodName: "GetSurvey", Handler: _SurveyService_GetSurvey_Handler, }, { MethodName: "ListSurveys", Handler: _SurveyService_ListSurveys_Handler, }, { MethodName: "DeleteSurvey", Handler: _SurveyService_DeleteSurvey_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "survey.proto", }
SurveyService_ServiceDesc is the grpc.ServiceDesc for SurveyService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSurveyServiceServer ¶
func RegisterSurveyServiceServer(s grpc.ServiceRegistrar, srv SurveyServiceServer)
Types ¶
type Answer ¶
type Answer struct { // id is the unique identifier for the answer Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"` // question_id is the ID of the question that the answer is for QuestionId string `protobuf:"bytes,2,opt,name=question_id,json=questionId,proto3" json:"question_id,omitempty" bson:"question_id"` // text is the text of the answer Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty" bson:"text"` // rating is the rating of the answer, 1-7 Rating int32 `protobuf:"varint,4,opt,name=rating,proto3" json:"rating,omitempty" bson:"rating"` // bool is the bool of the answer Bool bool `protobuf:"varint,5,opt,name=bool,proto3" json:"bool,omitempty" bson:"bool"` // choices is a list of choices for the question if the type is MULTI_CHOICE or SINGLE_CHOICE Choices []string `protobuf:"bytes,6,rep,name=choices,proto3" json:"choices,omitempty" bson:"choices"` // contains filtered or unexported fields }
func (*Answer) Descriptor
deprecated
func (*Answer) GetChoices ¶
func (*Answer) GetQuestionId ¶
func (*Answer) ProtoMessage ¶
func (*Answer) ProtoMessage()
func (*Answer) ProtoReflect ¶
func (x *Answer) ProtoReflect() protoreflect.Message
type CreateSurveyRequest ¶
type CreateSurveyRequest struct { // template_id is the ID of the template that the survey is based on TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty" bson:"template_id"` // answers is a list of answers to the questions in the template Answers []*Answer `protobuf:"bytes,2,rep,name=answers,proto3" json:"answers,omitempty" bson:"answers"` // contains filtered or unexported fields }
func (*CreateSurveyRequest) Descriptor
deprecated
func (*CreateSurveyRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateSurveyRequest.ProtoReflect.Descriptor instead.
func (*CreateSurveyRequest) GetAnswers ¶
func (x *CreateSurveyRequest) GetAnswers() []*Answer
func (*CreateSurveyRequest) GetTemplateId ¶
func (x *CreateSurveyRequest) GetTemplateId() string
func (*CreateSurveyRequest) ProtoMessage ¶
func (*CreateSurveyRequest) ProtoMessage()
func (*CreateSurveyRequest) ProtoReflect ¶
func (x *CreateSurveyRequest) ProtoReflect() protoreflect.Message
func (*CreateSurveyRequest) Reset ¶
func (x *CreateSurveyRequest) Reset()
func (*CreateSurveyRequest) String ¶
func (x *CreateSurveyRequest) String() string
type CreateTemplateRequest ¶
type CreateTemplateRequest struct { // name is the name of the template, e.g "Customer satisfaction" Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" bson:"name"` // description is a short description of the template Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" bson:"description"` // tags is a list of tags that can be used to categorize the template Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty" bson:"tags"` // questions is a list of questions that are part of the template Questions []*Question `protobuf:"bytes,4,rep,name=questions,proto3" json:"questions,omitempty" bson:"questions"` // contains filtered or unexported fields }
func (*CreateTemplateRequest) Descriptor
deprecated
func (*CreateTemplateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateTemplateRequest.ProtoReflect.Descriptor instead.
func (*CreateTemplateRequest) GetDescription ¶
func (x *CreateTemplateRequest) GetDescription() string
func (*CreateTemplateRequest) GetName ¶
func (x *CreateTemplateRequest) GetName() string
func (*CreateTemplateRequest) GetQuestions ¶
func (x *CreateTemplateRequest) GetQuestions() []*Question
func (*CreateTemplateRequest) GetTags ¶
func (x *CreateTemplateRequest) GetTags() []string
func (*CreateTemplateRequest) ProtoMessage ¶
func (*CreateTemplateRequest) ProtoMessage()
func (*CreateTemplateRequest) ProtoReflect ¶
func (x *CreateTemplateRequest) ProtoReflect() protoreflect.Message
func (*CreateTemplateRequest) Reset ¶
func (x *CreateTemplateRequest) Reset()
func (*CreateTemplateRequest) String ¶
func (x *CreateTemplateRequest) String() string
type DeleteSurveyRequest ¶
type DeleteSurveyRequest struct { SurveyId string `protobuf:"bytes,1,opt,name=survey_id,json=surveyId,proto3" json:"survey_id,omitempty" bson:"survey_id"` // contains filtered or unexported fields }
func (*DeleteSurveyRequest) Descriptor
deprecated
func (*DeleteSurveyRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteSurveyRequest.ProtoReflect.Descriptor instead.
func (*DeleteSurveyRequest) GetSurveyId ¶
func (x *DeleteSurveyRequest) GetSurveyId() string
func (*DeleteSurveyRequest) ProtoMessage ¶
func (*DeleteSurveyRequest) ProtoMessage()
func (*DeleteSurveyRequest) ProtoReflect ¶
func (x *DeleteSurveyRequest) ProtoReflect() protoreflect.Message
func (*DeleteSurveyRequest) Reset ¶
func (x *DeleteSurveyRequest) Reset()
func (*DeleteSurveyRequest) String ¶
func (x *DeleteSurveyRequest) String() string
type DeleteTemplateRequest ¶
type DeleteTemplateRequest struct { TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty" bson:"template_id"` // contains filtered or unexported fields }
func (*DeleteTemplateRequest) Descriptor
deprecated
func (*DeleteTemplateRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTemplateRequest.ProtoReflect.Descriptor instead.
func (*DeleteTemplateRequest) GetTemplateId ¶
func (x *DeleteTemplateRequest) GetTemplateId() string
func (*DeleteTemplateRequest) ProtoMessage ¶
func (*DeleteTemplateRequest) ProtoMessage()
func (*DeleteTemplateRequest) ProtoReflect ¶
func (x *DeleteTemplateRequest) ProtoReflect() protoreflect.Message
func (*DeleteTemplateRequest) Reset ¶
func (x *DeleteTemplateRequest) Reset()
func (*DeleteTemplateRequest) String ¶
func (x *DeleteTemplateRequest) String() string
type GetSurveyRequest ¶
type GetSurveyRequest struct { SurveyId string `protobuf:"bytes,1,opt,name=survey_id,json=surveyId,proto3" json:"survey_id,omitempty" bson:"survey_id"` // contains filtered or unexported fields }
func (*GetSurveyRequest) Descriptor
deprecated
func (*GetSurveyRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSurveyRequest.ProtoReflect.Descriptor instead.
func (*GetSurveyRequest) GetSurveyId ¶
func (x *GetSurveyRequest) GetSurveyId() string
func (*GetSurveyRequest) ProtoMessage ¶
func (*GetSurveyRequest) ProtoMessage()
func (*GetSurveyRequest) ProtoReflect ¶
func (x *GetSurveyRequest) ProtoReflect() protoreflect.Message
func (*GetSurveyRequest) Reset ¶
func (x *GetSurveyRequest) Reset()
func (*GetSurveyRequest) String ¶
func (x *GetSurveyRequest) String() string
type GetTemplateRequest ¶
type GetTemplateRequest struct {
// contains filtered or unexported fields
}
func (*GetTemplateRequest) Descriptor
deprecated
func (*GetTemplateRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTemplateRequest.ProtoReflect.Descriptor instead.
func (*GetTemplateRequest) ProtoMessage ¶
func (*GetTemplateRequest) ProtoMessage()
func (*GetTemplateRequest) ProtoReflect ¶
func (x *GetTemplateRequest) ProtoReflect() protoreflect.Message
func (*GetTemplateRequest) Reset ¶
func (x *GetTemplateRequest) Reset()
func (*GetTemplateRequest) String ¶
func (x *GetTemplateRequest) String() string
type ListSurveysRequest ¶
type ListSurveysRequest struct { TemplateIds []string `protobuf:"bytes,1,rep,name=template_ids,json=templateIds,proto3" json:"template_ids,omitempty" bson:"template_ids"` // pagination Limit *int64 `protobuf:"varint,4,opt,name=limit,proto3,oneof" json:"limit,omitempty" bson:"limit"` Offset *int64 `protobuf:"varint,5,opt,name=offset,proto3,oneof" json:"offset,omitempty" bson:"offset"` // contains filtered or unexported fields }
func (*ListSurveysRequest) Descriptor
deprecated
func (*ListSurveysRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListSurveysRequest.ProtoReflect.Descriptor instead.
func (*ListSurveysRequest) GetLimit ¶
func (x *ListSurveysRequest) GetLimit() int64
func (*ListSurveysRequest) GetOffset ¶
func (x *ListSurveysRequest) GetOffset() int64
func (*ListSurveysRequest) GetTemplateIds ¶
func (x *ListSurveysRequest) GetTemplateIds() []string
func (*ListSurveysRequest) ProtoMessage ¶
func (*ListSurveysRequest) ProtoMessage()
func (*ListSurveysRequest) ProtoReflect ¶
func (x *ListSurveysRequest) ProtoReflect() protoreflect.Message
func (*ListSurveysRequest) Reset ¶
func (x *ListSurveysRequest) Reset()
func (*ListSurveysRequest) String ¶
func (x *ListSurveysRequest) String() string
type ListSurveysResponse ¶
type ListSurveysResponse struct { // surveys is a list of surveys that match the search criteria Surveys []*Survey `protobuf:"bytes,1,rep,name=surveys,proto3" json:"surveys,omitempty" bson:"surveys"` // pagination info PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty" bson:"page_info"` // contains filtered or unexported fields }
func (*ListSurveysResponse) Descriptor
deprecated
func (*ListSurveysResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListSurveysResponse.ProtoReflect.Descriptor instead.
func (*ListSurveysResponse) GetPageInfo ¶
func (x *ListSurveysResponse) GetPageInfo() *PageInfo
func (*ListSurveysResponse) GetSurveys ¶
func (x *ListSurveysResponse) GetSurveys() []*Survey
func (*ListSurveysResponse) ProtoMessage ¶
func (*ListSurveysResponse) ProtoMessage()
func (*ListSurveysResponse) ProtoReflect ¶
func (x *ListSurveysResponse) ProtoReflect() protoreflect.Message
func (*ListSurveysResponse) Reset ¶
func (x *ListSurveysResponse) Reset()
func (*ListSurveysResponse) String ¶
func (x *ListSurveysResponse) String() string
type ListTemplatesRequest ¶
type ListTemplatesRequest struct { // tags is a list of tags that can be used to filter the templates Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty" bson:"tags"` // search for description and name, wild card search Search *string `protobuf:"bytes,2,opt,name=search,proto3,oneof" json:"search,omitempty" bson:"search"` // filter by exact match on name Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty" bson:"name"` // pagination Limit *int64 `protobuf:"varint,4,opt,name=limit,proto3,oneof" json:"limit,omitempty" bson:"limit"` Offset *int64 `protobuf:"varint,5,opt,name=offset,proto3,oneof" json:"offset,omitempty" bson:"offset"` // contains filtered or unexported fields }
func (*ListTemplatesRequest) Descriptor
deprecated
func (*ListTemplatesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListTemplatesRequest.ProtoReflect.Descriptor instead.
func (*ListTemplatesRequest) GetLimit ¶
func (x *ListTemplatesRequest) GetLimit() int64
func (*ListTemplatesRequest) GetName ¶
func (x *ListTemplatesRequest) GetName() string
func (*ListTemplatesRequest) GetOffset ¶
func (x *ListTemplatesRequest) GetOffset() int64
func (*ListTemplatesRequest) GetSearch ¶
func (x *ListTemplatesRequest) GetSearch() string
func (*ListTemplatesRequest) GetTags ¶
func (x *ListTemplatesRequest) GetTags() []string
func (*ListTemplatesRequest) ProtoMessage ¶
func (*ListTemplatesRequest) ProtoMessage()
func (*ListTemplatesRequest) ProtoReflect ¶
func (x *ListTemplatesRequest) ProtoReflect() protoreflect.Message
func (*ListTemplatesRequest) Reset ¶
func (x *ListTemplatesRequest) Reset()
func (*ListTemplatesRequest) String ¶
func (x *ListTemplatesRequest) String() string
type ListTemplatesResponse ¶
type ListTemplatesResponse struct { // templates is a list of templates that match the search criteria Templates []*Template `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty" bson:"templates"` // pagination info PageInfo *PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty" bson:"page_info"` // contains filtered or unexported fields }
func (*ListTemplatesResponse) Descriptor
deprecated
func (*ListTemplatesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListTemplatesResponse.ProtoReflect.Descriptor instead.
func (*ListTemplatesResponse) GetPageInfo ¶
func (x *ListTemplatesResponse) GetPageInfo() *PageInfo
func (*ListTemplatesResponse) GetTemplates ¶
func (x *ListTemplatesResponse) GetTemplates() []*Template
func (*ListTemplatesResponse) ProtoMessage ¶
func (*ListTemplatesResponse) ProtoMessage()
func (*ListTemplatesResponse) ProtoReflect ¶
func (x *ListTemplatesResponse) ProtoReflect() protoreflect.Message
func (*ListTemplatesResponse) Reset ¶
func (x *ListTemplatesResponse) Reset()
func (*ListTemplatesResponse) String ¶
func (x *ListTemplatesResponse) String() string
type PageInfo ¶
type PageInfo struct { // the total number of devices that matched the search Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty" bson:"total"` // the offset used in the search Offset *int64 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty" bson:"offset"` // the limit used in the search Limit *int64 `protobuf:"varint,3,opt,name=limit,proto3,oneof" json:"limit,omitempty" bson:"limit"` // the number of devices returned in this page Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty" bson:"count"` // contains filtered or unexported fields }
func (*PageInfo) Descriptor
deprecated
func (*PageInfo) ProtoMessage ¶
func (*PageInfo) ProtoMessage()
func (*PageInfo) ProtoReflect ¶
func (x *PageInfo) ProtoReflect() protoreflect.Message
type Question ¶
type Question struct { // id is the unique identifier for the question Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"` // template_id is the ID of the template that the question is part of TemplateId string `protobuf:"bytes,2,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty" bson:"template_id"` // text is the text of the question, e.g. "How satisfied are you with the service?" Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty" bson:"text"` // choices is a list of choices for the question if the type is MULTI_CHOICE or SINGLE_CHOICE Choices []string `protobuf:"bytes,4,rep,name=choices,proto3" json:"choices,omitempty" bson:"choices"` // type is the type of question, e.g. "text", "rating", "bool" Type Question_Type `protobuf:"varint,5,opt,name=type,proto3,enum=survey.Question_Type" json:"type,omitempty" bson:"type"` // required is a flag that indicates if the question is required or not Required bool `protobuf:"varint,6,opt,name=required,proto3" json:"required,omitempty" bson:"required"` // created is the timestamp for when the question was created Created *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created,proto3" json:"created,omitempty" bson:"created"` // updated is the timestamp for when the question was last updated Updated *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated,proto3" json:"updated,omitempty" bson:"updated"` // contains filtered or unexported fields }
func (*Question) Descriptor
deprecated
func (*Question) GetChoices ¶
func (*Question) GetCreated ¶
func (x *Question) GetCreated() *timestamppb.Timestamp
func (*Question) GetRequired ¶
func (*Question) GetTemplateId ¶
func (*Question) GetType ¶
func (x *Question) GetType() Question_Type
func (*Question) GetUpdated ¶
func (x *Question) GetUpdated() *timestamppb.Timestamp
func (*Question) ProtoMessage ¶
func (*Question) ProtoMessage()
func (*Question) ProtoReflect ¶
func (x *Question) ProtoReflect() protoreflect.Message
type Question_Type ¶
type Question_Type int32
const ( Question_QUESTION_TYPE_NOT_SPECIFIED Question_Type = 0 // question that expects a text answer Question_QUESTION_TYPE_TEXT Question_Type = 1 // question that expects a rating answer, 1-7 Question_QUESTION_TYPE_RATING Question_Type = 2 // question that expects a yes/no answer Question_QUESTION_TYPE_BOOL Question_Type = 3 // question that expects a multiple choice answer Question_QUESTION_TYPE_MULTIPLE_CHOICE Question_Type = 4 // question that expects a single choice answer Question_QUESTION_TYPE_SINGLE_CHOICE Question_Type = 5 )
func (Question_Type) Descriptor ¶
func (Question_Type) Descriptor() protoreflect.EnumDescriptor
func (Question_Type) Enum ¶
func (x Question_Type) Enum() *Question_Type
func (Question_Type) EnumDescriptor
deprecated
func (Question_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Question_Type.Descriptor instead.
func (Question_Type) Number ¶
func (x Question_Type) Number() protoreflect.EnumNumber
func (Question_Type) String ¶
func (x Question_Type) String() string
func (Question_Type) Type ¶
func (Question_Type) Type() protoreflect.EnumType
type Questions ¶
type Questions struct { // questions is a list of questions that are part of the template Questions []*Question `protobuf:"bytes,1,rep,name=questions,proto3" json:"questions,omitempty" bson:"questions"` // contains filtered or unexported fields }
func (*Questions) Descriptor
deprecated
func (*Questions) GetQuestions ¶
func (*Questions) ProtoMessage ¶
func (*Questions) ProtoMessage()
func (*Questions) ProtoReflect ¶
func (x *Questions) ProtoReflect() protoreflect.Message
type Survey ¶
type Survey struct { // the ID is generated when the survey is created in the backend Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"` // template_id is the ID of the template that the survey is based on TemplateId string `protobuf:"bytes,2,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty" bson:"template_id"` // answers is a list of answers to the questions in the template Answers []*Answer `protobuf:"bytes,3,rep,name=answers,proto3" json:"answers,omitempty" bson:"answers"` // created is the timestamp for when the survey was created Created *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created,proto3" json:"created,omitempty" bson:"created"` // contains filtered or unexported fields }
Survey is a small survey that can be sent to a user to get feedback on a specific topic, process or service. Displayed after the user has completed a task on the website or in the app. The survey is conducted directly in the app or on the website.
func (*Survey) Descriptor
deprecated
func (*Survey) GetAnswers ¶
func (*Survey) GetCreated ¶
func (x *Survey) GetCreated() *timestamppb.Timestamp
func (*Survey) GetTemplateId ¶
func (*Survey) ProtoMessage ¶
func (*Survey) ProtoMessage()
func (*Survey) ProtoReflect ¶
func (x *Survey) ProtoReflect() protoreflect.Message
type SurveyServiceClient ¶
type SurveyServiceClient interface { CreateTemplate(ctx context.Context, in *CreateTemplateRequest, opts ...grpc.CallOption) (*Template, error) GetTemplate(ctx context.Context, in *GetTemplateRequest, opts ...grpc.CallOption) (*Template, error) ListTemplates(ctx context.Context, in *ListTemplatesRequest, opts ...grpc.CallOption) (*ListTemplatesResponse, error) UpdateTemplate(ctx context.Context, in *UpdateTemplateRequest, opts ...grpc.CallOption) (*Template, error) DeleteTemplate(ctx context.Context, in *DeleteTemplateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) CreateSurvey(ctx context.Context, in *CreateSurveyRequest, opts ...grpc.CallOption) (*Survey, error) GetSurvey(ctx context.Context, in *GetSurveyRequest, opts ...grpc.CallOption) (*Survey, error) ListSurveys(ctx context.Context, in *ListSurveysRequest, opts ...grpc.CallOption) (*ListSurveysResponse, error) DeleteSurvey(ctx context.Context, in *DeleteSurveyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
SurveyServiceClient is the client API for SurveyService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewSurveyServiceClient ¶
func NewSurveyServiceClient(cc grpc.ClientConnInterface) SurveyServiceClient
type SurveyServiceServer ¶
type SurveyServiceServer interface { CreateTemplate(context.Context, *CreateTemplateRequest) (*Template, error) GetTemplate(context.Context, *GetTemplateRequest) (*Template, error) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) UpdateTemplate(context.Context, *UpdateTemplateRequest) (*Template, error) DeleteTemplate(context.Context, *DeleteTemplateRequest) (*emptypb.Empty, error) CreateSurvey(context.Context, *CreateSurveyRequest) (*Survey, error) GetSurvey(context.Context, *GetSurveyRequest) (*Survey, error) ListSurveys(context.Context, *ListSurveysRequest) (*ListSurveysResponse, error) DeleteSurvey(context.Context, *DeleteSurveyRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
SurveyServiceServer is the server API for SurveyService service. All implementations must embed UnimplementedSurveyServiceServer for forward compatibility
type Tags ¶
type Tags struct { Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty" bson:"tags"` // contains filtered or unexported fields }
Tags is a list of tags that can be used to categorize the template
func (*Tags) Descriptor
deprecated
func (*Tags) ProtoMessage ¶
func (*Tags) ProtoMessage()
func (*Tags) ProtoReflect ¶
func (x *Tags) ProtoReflect() protoreflect.Message
type Template ¶
type Template struct { // id is the unique identifier for the template Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"` // name is the name of the template, e.g "Customer satisfaction" Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" bson:"name"` // description is a short description of the template Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" bson:"description"` // tags is a list of tags that can be used to categorize the template Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" bson:"tags"` // questions is a list of questions that are part of the template Questions []*Question `protobuf:"bytes,5,rep,name=questions,proto3" json:"questions,omitempty" bson:"questions"` // created is the timestamp for when the template was created Created *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created,proto3" json:"created,omitempty" bson:"created"` // updated is the timestamp for when the template was last updated Updated *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated,proto3" json:"updated,omitempty" bson:"updated"` // contains filtered or unexported fields }
Template is a template for a survey. The frontend can poll the backend to get a specific template and then use that to create a survey for a user.
func (*Template) Descriptor
deprecated
func (*Template) GetCreated ¶
func (x *Template) GetCreated() *timestamppb.Timestamp
func (*Template) GetDescription ¶
func (*Template) GetQuestions ¶
func (*Template) GetUpdated ¶
func (x *Template) GetUpdated() *timestamppb.Timestamp
func (*Template) ProtoMessage ¶
func (*Template) ProtoMessage()
func (*Template) ProtoReflect ¶
func (x *Template) ProtoReflect() protoreflect.Message
type UnimplementedSurveyServiceServer ¶
type UnimplementedSurveyServiceServer struct { }
UnimplementedSurveyServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSurveyServiceServer) CreateSurvey ¶
func (UnimplementedSurveyServiceServer) CreateSurvey(context.Context, *CreateSurveyRequest) (*Survey, error)
func (UnimplementedSurveyServiceServer) CreateTemplate ¶
func (UnimplementedSurveyServiceServer) CreateTemplate(context.Context, *CreateTemplateRequest) (*Template, error)
func (UnimplementedSurveyServiceServer) DeleteSurvey ¶
func (UnimplementedSurveyServiceServer) DeleteSurvey(context.Context, *DeleteSurveyRequest) (*emptypb.Empty, error)
func (UnimplementedSurveyServiceServer) DeleteTemplate ¶
func (UnimplementedSurveyServiceServer) DeleteTemplate(context.Context, *DeleteTemplateRequest) (*emptypb.Empty, error)
func (UnimplementedSurveyServiceServer) GetSurvey ¶
func (UnimplementedSurveyServiceServer) GetSurvey(context.Context, *GetSurveyRequest) (*Survey, error)
func (UnimplementedSurveyServiceServer) GetTemplate ¶
func (UnimplementedSurveyServiceServer) GetTemplate(context.Context, *GetTemplateRequest) (*Template, error)
func (UnimplementedSurveyServiceServer) ListSurveys ¶
func (UnimplementedSurveyServiceServer) ListSurveys(context.Context, *ListSurveysRequest) (*ListSurveysResponse, error)
func (UnimplementedSurveyServiceServer) ListTemplates ¶
func (UnimplementedSurveyServiceServer) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error)
func (UnimplementedSurveyServiceServer) UpdateTemplate ¶
func (UnimplementedSurveyServiceServer) UpdateTemplate(context.Context, *UpdateTemplateRequest) (*Template, error)
type UnsafeSurveyServiceServer ¶
type UnsafeSurveyServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSurveyServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SurveyServiceServer will result in compilation errors.
type UpdateTemplateRequest ¶
type UpdateTemplateRequest struct { // template_id is the ID of the template that should be updated TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty" bson:"template_id"` // if name is set, the name of the template will be updated Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty" bson:"name"` // if description is set, the description of the template will be updated Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty" bson:"description"` // if tags is set, the tags of the template will be updated Tags *Tags `protobuf:"bytes,4,opt,name=tags,proto3,oneof" json:"tags,omitempty" bson:"tags"` // if questions is set, the questions of the template will be replaced with the new questions Questions *Questions `protobuf:"bytes,5,opt,name=questions,proto3,oneof" json:"questions,omitempty" bson:"questions"` // contains filtered or unexported fields }
func (*UpdateTemplateRequest) Descriptor
deprecated
func (*UpdateTemplateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateTemplateRequest.ProtoReflect.Descriptor instead.
func (*UpdateTemplateRequest) GetDescription ¶
func (x *UpdateTemplateRequest) GetDescription() string
func (*UpdateTemplateRequest) GetName ¶
func (x *UpdateTemplateRequest) GetName() string
func (*UpdateTemplateRequest) GetQuestions ¶
func (x *UpdateTemplateRequest) GetQuestions() *Questions
func (*UpdateTemplateRequest) GetTags ¶
func (x *UpdateTemplateRequest) GetTags() *Tags
func (*UpdateTemplateRequest) GetTemplateId ¶
func (x *UpdateTemplateRequest) GetTemplateId() string
func (*UpdateTemplateRequest) ProtoMessage ¶
func (*UpdateTemplateRequest) ProtoMessage()
func (*UpdateTemplateRequest) ProtoReflect ¶
func (x *UpdateTemplateRequest) ProtoReflect() protoreflect.Message
func (*UpdateTemplateRequest) Reset ¶
func (x *UpdateTemplateRequest) Reset()
func (*UpdateTemplateRequest) String ¶
func (x *UpdateTemplateRequest) String() string