models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotificationTypeUnspecified = NotificationType("")
	NotificationTypeSMS         = NotificationType("sms")
	NotificationTypeEMail       = NotificationType("email")
)

Functions

func NotificationTypeToProto

func NotificationTypeToProto(nt NotificationType) commentv1.NotificationType

Types

type Comment

type Comment struct {
	Scope     string             `bson:"scopeId"`
	Reference string             `bson:"ref"`
	ID        primitive.ObjectID `bson:"_id"`
	Content   string             `bson:"content"`
	ParentID  primitive.ObjectID `bson:"parentId,omitempty"`
	CreatedAt time.Time          `bson:"createdAt"`
	CreatorID string             `bson:"creatorId"`
}

func (Comment) ToProto

func (c Comment) ToProto() *commentv1.Comment

type CommentTree

type CommentTree struct {
	Comment Comment
	Answers []*CommentTree
}

func (CommentTree) ToProto

func (ct CommentTree) ToProto(recurse bool) *commentv1.CommentTree

type NotificationType

type NotificationType string

func NotifcationTypeFromProto

func NotifcationTypeFromProto(npb commentv1.NotificationType) NotificationType

type Scope

type Scope struct {
	InternalID             primitive.ObjectID `bson:"_id"`
	ID                     string             `bson:"scopeId"`
	Name                   string             `bson:"name"`
	NotificationType       NotificationType   `bson:"notificationType"`
	CommentViewURLTemplate string             `bson:"viewUrlTemplate"`
	OwnerIDs               []string           `bson:"scopeOwnerIds"`
}

func (Scope) ToProto

func (s Scope) ToProto() *commentv1.Scope

Jump to

Keyboard shortcuts

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