surveypb

package
v0.0.0-...-fd56321 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_survey_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Answer.ProtoReflect.Descriptor instead.

func (*Answer) GetBool

func (x *Answer) GetBool() bool

func (*Answer) GetChoices

func (x *Answer) GetChoices() []string

func (*Answer) GetId

func (x *Answer) GetId() string

func (*Answer) GetQuestionId

func (x *Answer) GetQuestionId() string

func (*Answer) GetRating

func (x *Answer) GetRating() int32

func (*Answer) GetText

func (x *Answer) GetText() string

func (*Answer) ProtoMessage

func (*Answer) ProtoMessage()

func (*Answer) ProtoReflect

func (x *Answer) ProtoReflect() protoreflect.Message

func (*Answer) Reset

func (x *Answer) Reset()

func (*Answer) String

func (x *Answer) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use PageInfo.ProtoReflect.Descriptor instead.

func (*PageInfo) GetCount

func (x *PageInfo) GetCount() int64

func (*PageInfo) GetLimit

func (x *PageInfo) GetLimit() int64

func (*PageInfo) GetOffset

func (x *PageInfo) GetOffset() int64

func (*PageInfo) GetTotal

func (x *PageInfo) GetTotal() int64

func (*PageInfo) ProtoMessage

func (*PageInfo) ProtoMessage()

func (*PageInfo) ProtoReflect

func (x *PageInfo) ProtoReflect() protoreflect.Message

func (*PageInfo) Reset

func (x *PageInfo) Reset()

func (*PageInfo) String

func (x *PageInfo) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Question.ProtoReflect.Descriptor instead.

func (*Question) GetChoices

func (x *Question) GetChoices() []string

func (*Question) GetCreated

func (x *Question) GetCreated() *timestamppb.Timestamp

func (*Question) GetId

func (x *Question) GetId() string

func (*Question) GetRequired

func (x *Question) GetRequired() bool

func (*Question) GetTemplateId

func (x *Question) GetTemplateId() string

func (*Question) GetText

func (x *Question) GetText() string

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

func (*Question) Reset

func (x *Question) Reset()

func (*Question) String

func (x *Question) String() string

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) 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 (Question_Type) String

func (x Question_Type) String() string

func (Question_Type) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Questions.ProtoReflect.Descriptor instead.

func (*Questions) GetQuestions

func (x *Questions) GetQuestions() []*Question

func (*Questions) ProtoMessage

func (*Questions) ProtoMessage()

func (*Questions) ProtoReflect

func (x *Questions) ProtoReflect() protoreflect.Message

func (*Questions) Reset

func (x *Questions) Reset()

func (*Questions) String

func (x *Questions) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Survey.ProtoReflect.Descriptor instead.

func (*Survey) GetAnswers

func (x *Survey) GetAnswers() []*Answer

func (*Survey) GetCreated

func (x *Survey) GetCreated() *timestamppb.Timestamp

func (*Survey) GetId

func (x *Survey) GetId() string

func (*Survey) GetTemplateId

func (x *Survey) GetTemplateId() string

func (*Survey) ProtoMessage

func (*Survey) ProtoMessage()

func (*Survey) ProtoReflect

func (x *Survey) ProtoReflect() protoreflect.Message

func (*Survey) Reset

func (x *Survey) Reset()

func (*Survey) String

func (x *Survey) String() string

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Tags.ProtoReflect.Descriptor instead.

func (*Tags) GetTags

func (x *Tags) GetTags() []string

func (*Tags) ProtoMessage

func (*Tags) ProtoMessage()

func (*Tags) ProtoReflect

func (x *Tags) ProtoReflect() protoreflect.Message

func (*Tags) Reset

func (x *Tags) Reset()

func (*Tags) String

func (x *Tags) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Template.ProtoReflect.Descriptor instead.

func (*Template) GetCreated

func (x *Template) GetCreated() *timestamppb.Timestamp

func (*Template) GetDescription

func (x *Template) GetDescription() string

func (*Template) GetId

func (x *Template) GetId() string

func (*Template) GetName

func (x *Template) GetName() string

func (*Template) GetQuestions

func (x *Template) GetQuestions() []*Question

func (*Template) GetTags

func (x *Template) GetTags() []string

func (*Template) GetUpdated

func (x *Template) GetUpdated() *timestamppb.Timestamp

func (*Template) ProtoMessage

func (*Template) ProtoMessage()

func (*Template) ProtoReflect

func (x *Template) ProtoReflect() protoreflect.Message

func (*Template) Reset

func (x *Template) Reset()

func (*Template) String

func (x *Template) String() string

type UnimplementedSurveyServiceServer

type UnimplementedSurveyServiceServer struct {
}

UnimplementedSurveyServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSurveyServiceServer) CreateSurvey

func (UnimplementedSurveyServiceServer) CreateTemplate

func (UnimplementedSurveyServiceServer) DeleteSurvey

func (UnimplementedSurveyServiceServer) DeleteTemplate

func (UnimplementedSurveyServiceServer) GetSurvey

func (UnimplementedSurveyServiceServer) GetTemplate

func (UnimplementedSurveyServiceServer) ListSurveys

func (UnimplementedSurveyServiceServer) ListTemplates

func (UnimplementedSurveyServiceServer) UpdateTemplate

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

Jump to

Keyboard shortcuts

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