Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeCursor(i int) string
- type AddDiscussionParticipantInput
- type AnonymityType
- type AppActionID
- type ConciergeContent
- type ConciergeOption
- type ContentQueueRecord
- type Discussion
- type DiscussionAccessRequest
- type DiscussionAutoPost
- type DiscussionFlairTemplateAccess
- type DiscussionInput
- type DiscussionInvite
- type DiscussionLinkAccess
- type DiscussionNotificationPreferences
- type DiscussionParticipantKey
- type DiscussionParticipantKeys
- type DiscussionPostKey
- type DiscussionUserAccess
- type DiscussionViewerKey
- type DiscussionViewerKeys
- type DiscussionsConnection
- type DiscussionsEdge
- type DripPostType
- type Entity
- type Flair
- type FlairTemplate
- type GradientColor
- type ImportedContent
- type ImportedContentInput
- type InviteRequestStatus
- type InviteType
- type Media
- type MediaSize
- type Moderator
- type MutationID
- type PageInfo
- type ParsedEntityID
- type Participant
- type ParticipantNotificationPreferences
- type ParticipantProfile
- type ParticipantsConnection
- type ParticipantsEdge
- type Platform
- type PollInput
- type Post
- type PostBookmark
- type PostBookmarksConnection
- type PostBookmarksEdge
- type PostContent
- type PostContentInput
- type PostDeletedReason
- type PostType
- type PostsConnection
- type PostsEdge
- type SocialInfo
- type Tag
- type URL
- type UnknownEntity
- type UpdateParticipantInput
- type User
- type UserDevice
- type UserProfile
- type Viewer
- type ViewerNotificationPreferences
- type ViewersConnection
- type ViewersEdge
Constants ¶
View Source
const ( InviteTypeInvite InviteType = "invite" InviteTypeAccessRequestAccepted InviteType = "access_granted" InviteLinkHostname string = "https://m.chatham.ai/join" )
View Source
const ( ParticipantPrefix = "participant" DiscussionPrefix = "discussion" // DripPostType tells us if the imported content was dripped manually by the mod, // automatically via the discussion tags and drip, OR scheduled by the mod. ManualDrip DripPostType = "manual" AutoDrip DripPostType = "auto" ScheduledDrip DripPostType = "scheduled" AppActionCopyToClipboard AppActionID = "db5fd0da-d645-4aa2-990c-b61d004a45e1" AppActionRenameChat AppActionID = "d81118d6-427a-4267-96be-45cadd94b782" MutationUpdateFlairAccessToDiscussion MutationID = "4e960003-da38-4971-a23b-98953cb5ce4b" MutationUpdateInvitationApproval MutationID = "84c0e197-6394-4b9a-87dc-91e75e7faf67" MutationUpdateViewerAccessibility MutationID = "e8c71b3c-b984-4090-b032-7dbfd374e8c9" MutationUpdateDiscussionNameAndEmoji MutationID = "633cb21f-a004-45d4-b4e8-bd6cd0bdaea9" )
View Source
const (
ConciergeUser = "88c8c5ae-41e9-49ef-b5ea-db2e08762693"
)
Variables ¶
View Source
var AllAnonymityType = []AnonymityType{ AnonymityTypeUnknown, AnonymityTypeWeak, AnonymityTypeStrong, }
View Source
var AllGradientColor = []GradientColor{ GradientColorUnknown, GradientColorMauve, GradientColorFuschia, GradientColorCinnabar, GradientColorVermillion, GradientColorCerulean, GradientColorTurquoise, GradientColorCeladon, GradientColorTaupe, GradientColorSaffron, GradientColorViridian, GradientColorChartruese, GradientColorLavender, GradientColorGoldenrod, GradientColorSeafoam, GradientColorAzalea, GradientColorViolet, GradientColorMahogany, }
View Source
var AllInviteRequestStatus = []InviteRequestStatus{ InviteRequestStatusAccepted, InviteRequestStatusRejected, InviteRequestStatusPending, InviteRequestStatusCancelled, }
View Source
var AllPlatform = []Platform{ PlatformUnknown, PlatformIos, PlatformAndroid, PlatformWeb, }
View Source
var AllPostDeletedReason = []PostDeletedReason{ PostDeletedReasonUnknown, PostDeletedReasonModeratorRemoved, PostDeletedReasonParticipantRemoved, }
View Source
var AllPostType = []PostType{ PostTypeStandard, PostTypeImportedContent, PostTypeAlert, PostTypeConcierge, }
View Source
var ( DatabaseModels = []interface{}{ User{}, UserProfile{}, Moderator{}, Discussion{}, FlairTemplate{}, Flair{}, Participant{}, PostContent{}, Post{}, Viewer{}, } )
Functions ¶
func EncodeCursor ¶
Types ¶
type AddDiscussionParticipantInput ¶
type AddDiscussionParticipantInput struct { GradientColor *GradientColor `json:"gradientColor"` FlairID *string `json:"flairID"` HasJoined *bool `json:"hasJoined"` IsAnonymous bool `json:"isAnonymous"` }
type AnonymityType ¶
type AnonymityType string
const ( AnonymityTypeUnknown AnonymityType = "UNKNOWN" AnonymityTypeWeak AnonymityType = "WEAK" AnonymityTypeStrong AnonymityType = "STRONG" )
func (AnonymityType) IsValid ¶
func (e AnonymityType) IsValid() bool
func (AnonymityType) MarshalGQL ¶
func (e AnonymityType) MarshalGQL(w io.Writer)
func (AnonymityType) String ¶
func (e AnonymityType) String() string
func (*AnonymityType) UnmarshalGQL ¶
func (e *AnonymityType) UnmarshalGQL(v interface{}) error
type AppActionID ¶
type AppActionID string
type ConciergeContent ¶
type ConciergeContent struct { AppActionID *string `json:"appActionID"` MutationID *string `json:"mutationID"` Options []*ConciergeOption `json:"options"` }
type ConciergeOption ¶
type ContentQueueRecord ¶
type Discussion ¶
type Discussion struct { Entity ID string `json:"id" dynamodbav:"ID" gorm:"type:varchar(36);"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` Title string `json:"title" gorm:"not null;"` AnonymityType AnonymityType `json:"anonymityType" gorm:"type:varchar(36);not null;"` ModeratorID *string `json:"moderatorID" gorm:"type:varchar(36);"` Moderator *Moderator `json:"moderator" gorm:"foreignKey:ModeratorID;"` Posts []*Post `gorm:"foreignKey:DiscussionID;"` PostConnections *PostsConnection `json:"posts" dynamodbav:"-" gorm:"-"` Participants []*Participant `json:"participants" dynamodbav:"-" gorm:"foreignKey:DiscussionID;"` AutoPost bool `json:"auto_post"` IdleMinutes int `json:"idle_minutes"` PublicAccess bool `json:"publicAccess"` IconURL *string `json:"icon_url"` }
func (Discussion) IsEntity ¶
func (Discussion) IsEntity()
type DiscussionAccessRequest ¶
type DiscussionAutoPost ¶
type DiscussionInput ¶
type DiscussionInvite ¶
type DiscussionInvite struct { ID string `json:"id"` UserID string DiscussionID string InvitingParticipantID string CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` IsDeleted bool `json:"isDeleted"` Status InviteRequestStatus `json:"status"` InviteType InviteType }
type DiscussionLinkAccess ¶
type DiscussionNotificationPreferences ¶
type DiscussionNotificationPreferences interface {
IsDiscussionNotificationPreferences()
}
type DiscussionParticipantKey ¶
type DiscussionParticipantKey struct { DiscussionID string `json:"discussionID"` ParticipantID int `json:"participantID"` }
func (DiscussionParticipantKey) MarshalDynamoDBAttributeValue ¶
func (d DiscussionParticipantKey) MarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error
func (DiscussionParticipantKey) String ¶
func (d DiscussionParticipantKey) String() string
type DiscussionParticipantKeys ¶
type DiscussionParticipantKeys struct {
Keys []DiscussionParticipantKey `json:"keys" dynamodbav:",omitempty"`
}
func (DiscussionParticipantKeys) MarshalDynamoDBAttributeValue ¶
func (d DiscussionParticipantKeys) MarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error
func (*DiscussionParticipantKeys) UnmarshalDynamoDBAttributeValue ¶
func (d *DiscussionParticipantKeys) UnmarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error
type DiscussionPostKey ¶
type DiscussionUserAccess ¶
type DiscussionViewerKey ¶
type DiscussionViewerKey struct { DiscussionID string `json:"discussionID"` ViewerID string `json:"participantID"` }
func (DiscussionViewerKey) MarshalDynamoDBAttributeValue ¶
func (d DiscussionViewerKey) MarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error
func (DiscussionViewerKey) String ¶
func (d DiscussionViewerKey) String() string
type DiscussionViewerKeys ¶
type DiscussionViewerKeys struct {
Keys []DiscussionViewerKey `json:"keys" dynamodbav:",omitempty"`
}
func (DiscussionViewerKeys) MarshalDynamoDBAttributeValue ¶
func (d DiscussionViewerKeys) MarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error
func (*DiscussionViewerKeys) UnmarshalDynamoDBAttributeValue ¶
func (d *DiscussionViewerKeys) UnmarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error
type DiscussionsConnection ¶
type DiscussionsConnection struct { IDs []string From int To int Edges []*DiscussionsEdge }
func (*DiscussionsConnection) PageInfo ¶
func (d *DiscussionsConnection) PageInfo() PageInfo
func (*DiscussionsConnection) TotalCount ¶
func (d *DiscussionsConnection) TotalCount() int
type DiscussionsEdge ¶
type DiscussionsEdge struct { Cursor string `json:"cursor"` Node *Discussion `json:"node"` }
type DripPostType ¶
type DripPostType string
type Flair ¶
type Flair struct { ID string `json:"id" dynamodbav:"ID" gorm:"type:varchar(36);primary_key;"` TemplateID string `json:"templateID" dynamodbav:"TemplateID" gorm:"type:varchar(36);"` Template *FlairTemplate `json:"template" dynamodbav:"-" gorm:"foreignKey:TemplateID;"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` // NOTE: This is not exposed as of 05/01/2020 UserID string `json:"userID" dynamodbav:"UserID" gorm:"type:varchar(36);"` User *User `json:"user" dynamodbav:"-" gorm:"foreignKey:UserID;"` }
type FlairTemplate ¶
type FlairTemplate struct { ID string `json:"id" dynamodbav:"ID" gorm:"type:varchar(36);primary_key;"` DisplayName *string `json:"displayName" gorm:"type:varchar(64);"` ImageURL *string `json:"imageURL" gorm:"type:text;"` Source string `json:"source" gorm:"type:varchar(128);not null;"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` }
type GradientColor ¶
type GradientColor string
const ( GradientColorUnknown GradientColor = "UNKNOWN" GradientColorMauve GradientColor = "MAUVE" GradientColorFuschia GradientColor = "FUSCHIA" GradientColorCinnabar GradientColor = "CINNABAR" GradientColorVermillion GradientColor = "VERMILLION" GradientColorCerulean GradientColor = "CERULEAN" GradientColorTurquoise GradientColor = "TURQUOISE" GradientColorCeladon GradientColor = "CELADON" GradientColorTaupe GradientColor = "TAUPE" GradientColorSaffron GradientColor = "SAFFRON" GradientColorViridian GradientColor = "VIRIDIAN" GradientColorChartruese GradientColor = "CHARTRUESE" GradientColorLavender GradientColor = "LAVENDER" GradientColorGoldenrod GradientColor = "GOLDENROD" GradientColorSeafoam GradientColor = "SEAFOAM" GradientColorAzalea GradientColor = "AZALEA" GradientColorViolet GradientColor = "VIOLET" GradientColorMahogany GradientColor = "MAHOGANY" )
func (GradientColor) IsValid ¶
func (e GradientColor) IsValid() bool
func (GradientColor) MarshalGQL ¶
func (e GradientColor) MarshalGQL(w io.Writer)
func (GradientColor) String ¶
func (e GradientColor) String() string
func (*GradientColor) UnmarshalGQL ¶
func (e *GradientColor) UnmarshalGQL(v interface{}) error
type ImportedContent ¶
type ImportedContentInput ¶
type InviteRequestStatus ¶
type InviteRequestStatus string
const ( InviteRequestStatusAccepted InviteRequestStatus = "ACCEPTED" InviteRequestStatusRejected InviteRequestStatus = "REJECTED" InviteRequestStatusPending InviteRequestStatus = "PENDING" InviteRequestStatusCancelled InviteRequestStatus = "CANCELLED" )
func (InviteRequestStatus) IsValid ¶
func (e InviteRequestStatus) IsValid() bool
func (InviteRequestStatus) MarshalGQL ¶
func (e InviteRequestStatus) MarshalGQL(w io.Writer)
func (InviteRequestStatus) String ¶
func (e InviteRequestStatus) String() string
func (*InviteRequestStatus) UnmarshalGQL ¶
func (e *InviteRequestStatus) UnmarshalGQL(v interface{}) error
type InviteType ¶
type InviteType string
type Moderator ¶
type Moderator struct { ID string `json:"id" gorm:"type:varchar(36);"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` UserProfileID *string `json:"userProfileID" gorm:"type:varchar(36);"` UserProfile *UserProfile `json:"userProfile" dynamodbav:"-" gorm:"foreignKey:UserProfileID;"` Discussion *Discussion `gorm:"-" dynamodbav:"-"` }
type MutationID ¶
type MutationID string
type ParsedEntityID ¶
type Participant ¶
type Participant struct { Entity ID string `json:"id" gorm:"type:varchar(36);"` ParticipantID int `json:"participantID" dynamodbav:"ParticipantID"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` DiscussionID *string `json:"discussionID" dynamodbav:"DiscussionID" gorm:"type:varchar(36);"` Discussion *Discussion `json:"discussion" dynamodbav:"-" gorm:"foreignKey:DiscussionID;"` ViewerID *string `json:"viewerID" gorm:"type:varchar(36);"` Viewer *Viewer `json:"viewer" dynamodbav:"-" gorm:"foreignKey:ViewerID;"` Posts *PostsConnection `json:"posts" dynamodbav:"-"` FlairID *string `json:"flairID" dynamodbav:"FlairID" gorm:"type:varchar(36);"` Flair *Flair `json:"flair" dynamodbav:"-" gorm:"foreignKey:FlairID;"` GradientColor *GradientColor `json:"gradientColor" gorm:"type:varchar(36);not null;"` UserID *string `json:"userID" gorm:"type:varchar(36);"` User *User `json:"user" dynamodbav:"-" gorm:"foreignKey:UserID;"` InviterID *string `json:"inviterID" gorm:"type:varchar(36);"` IsBanned bool `json:"isBanned" gorm:"type:boolean;"` HasJoined bool `json:"hasJoined" gorm:"type:boolean;"` IsAnonymous bool `json:"isAnonymous"` }
func (Participant) IsEntity ¶
func (Participant) IsEntity()
type ParticipantNotificationPreferences ¶
type ParticipantNotificationPreferences struct {
ID string `json:"id"`
}
func (ParticipantNotificationPreferences) IsDiscussionNotificationPreferences ¶
func (ParticipantNotificationPreferences) IsDiscussionNotificationPreferences()
type ParticipantProfile ¶
type ParticipantProfile struct { IsAnonymous *bool `json:"isAnonymous"` Flair *Flair `json:"flair"` GradientColor *GradientColor `json:"gradientColor"` }
type ParticipantsConnection ¶
type ParticipantsConnection struct {
// contains filtered or unexported fields
}
func (*ParticipantsConnection) PageInfo ¶
func (p *ParticipantsConnection) PageInfo() PageInfo
func (*ParticipantsConnection) TotalCount ¶
func (p *ParticipantsConnection) TotalCount() int
type ParticipantsEdge ¶
type ParticipantsEdge struct { Cursor string `json:"cursor"` Node *Participant `json:"node"` }
type Post ¶
type Post struct { ID string `json:"id" dynamodbav:"ID" gorm:"type:varchar(36);"` PostType PostType `json:"postType"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` DeletedReasonCode *PostDeletedReason `json:"deletedReasonCode" gorm:"type:varchar(36);"` Discussion *Discussion `json:"discussion" dynamodbav:"-" gorm:"foreignkey:DiscussionID;"` DiscussionID *string `json:"discussionID" dynamodbav:"DiscussionID" gorm:"type:varchar(36);"` Participant *Participant `json:"participant" dynamodbav:"-" gorm:"foreignkey:ParticipantID;"` ParticipantID *string `json:"participantID" gorm:"varchar(36);"` PostContentID *string `json:"postContentID" gorm:"type:varchar(36);"` PostContent *PostContent `json:"postContent" gorm:"foreignkey:PostContentID;"` // TODO: Do we want to also log the post_content ID so that quoted text doesn't change? QuotedPostID *string `json:"quotedPostID" gorm:"type:varchar(36);"` QuotedPost *Post MediaID *string ImportedContentID *string ConciergeContent *ConciergeContent }
type PostBookmark ¶
type PostBookmark struct { ID string `json:"id" dynamodbav:"ID"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` DiscussionID string `json:"discussionID"` Discussion *Discussion `json:"discussion" dynamodbav:"-" gorm:"foreignkey:DiscussionID;"` PostID string `json:"postID"` Post *Post `json:"post" dynamodbav:"-" gorm:"foreignkey:PostID;"` }
type PostBookmarksConnection ¶
type PostBookmarksConnection struct {
// contains filtered or unexported fields
}
func (*PostBookmarksConnection) PageInfo ¶
func (p *PostBookmarksConnection) PageInfo() PageInfo
func (*PostBookmarksConnection) TotalCount ¶
func (p *PostBookmarksConnection) TotalCount() int
type PostBookmarksEdge ¶
type PostBookmarksEdge struct { Cursor string `json:"cursor"` Node *PostBookmark `json:"node"` }
type PostContent ¶
type PostContent struct { ID string `json:"id" gorm:"type:varchar(36);"` Content string `json:"content" gorm:"type:text;"` MentionedEntities []string `json:"mentionedEntities" gorm:"type:varchar(50)[];"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` }
This is really a placeholder rn. We will want the following: * Edit history and active version * Markup (e.g. when people are tagged having that be an ID or a token) * URL Wrapping * Ability to contain different types of posts (e.g. images, twitter cards)
type PostContentInput ¶
type PostContentInput struct { PostText string `json:"postText"` PostType PostType `json:"postType"` MentionedEntities []string `json:"mentionedEntities"` QuotedPostID *string `json:"quotedPostID"` MediaID *string `json:"mediaID"` Poll *PollInput `json:"poll"` ImportedContentID *string `json:"importedContentID"` Preview *string `json:"preview"` }
type PostDeletedReason ¶
type PostDeletedReason string
const ( PostDeletedReasonUnknown PostDeletedReason = "UNKNOWN" PostDeletedReasonModeratorRemoved PostDeletedReason = "MODERATOR_REMOVED" PostDeletedReasonParticipantRemoved PostDeletedReason = "PARTICIPANT_REMOVED" )
func (PostDeletedReason) IsValid ¶
func (e PostDeletedReason) IsValid() bool
func (PostDeletedReason) MarshalGQL ¶
func (e PostDeletedReason) MarshalGQL(w io.Writer)
func (PostDeletedReason) String ¶
func (e PostDeletedReason) String() string
func (*PostDeletedReason) UnmarshalGQL ¶
func (e *PostDeletedReason) UnmarshalGQL(v interface{}) error
type PostsConnection ¶
type SocialInfo ¶
type SocialInfo struct { CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` AccessToken string `json:"accessToken"` AccessTokenSecret string `json:"accessTokenSecret"` // NOTE: This is the social network UserID (not Chatham) UserID string `json:"userID"` ProfileImageURL string `json:"profileImageURL"` ScreenName string `json:"screenName"` IsVerified bool `json:"isVerified"` Network string `json:"network" gorm:"type:varchar(16);primary_key;auto_increment:false;"` UserProfileID string `json:"user_profile_id" gorm:"type:varchar(32);primary_key;auto_increment:false;"` }
type UnknownEntity ¶
type UnknownEntity struct {
ID string `json:"id"`
}
func (UnknownEntity) IsEntity ¶
func (UnknownEntity) IsEntity()
type UpdateParticipantInput ¶
type User ¶
type User struct { ID string `json:"id" dynamodbav:"ID" gorm:"type:varchar(36);"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` UserProfile *UserProfile `json:"userProfile" dynamodbav:"-" gorm:"foreignkey:UserID;"` // Going through a `through` table so we can encrypt this in the future. Participants []*Participant `json:"participants" dynamodbav:"-" gorm:"foreignKey:UserID;"` Viewers []*Viewer `json:"viewers" dynamodbav:"-" gorm:"foreignKey:UserID;"` Flairs []*Flair `json:"flairs" dynamodbav:"-" gorm:"foreignKey:FlairID;"` }
type UserDevice ¶
type UserDevice struct { ID string `json:"id" gorm:"type:varchar(36);"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` Platform string `json:"platform" gorm:"not null;"` LastSeen time.Time `json:"lastSeen" gorm:"not null;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;"` Token *string `json:"token" gorm:"type:varchar(128);"` UserID *string `json:"userID" gorm:"type:varchar(36);"` User *User `json:"user" gorm:"foreignKey:UserID;"` }
type UserProfile ¶
type UserProfile struct { ID string `json:"id" gorm:"type:varchar(32);"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` DisplayName string `json:"displayName" gorm:"type:varchar(256);"` UserID *string `json:"userID" dynamodbav:",omitempty" gorm:"type:varchar(32);"` // Handle without the `@` sign. TwitterHandle string `json:"twitterHandle"` SocialInfos []SocialInfo `json:"socialInfos" gorm:"foreignKey:UserProfileID;PRELOAD:true;"` }
func (*UserProfile) TwitterURL ¶
func (u *UserProfile) TwitterURL() URL
type Viewer ¶
type Viewer struct { ID string `json:"id" dynamodbav:"ViewerID" gorm:"type:varchar(36);"` CreatedAt time.Time `json:"createdAt" gorm:"not null;default:CURRENT_TIMESTAMP;"` UpdatedAt time.Time `json:"updatedAt" gorm:"not null;default:CURRENT_TIMESTAMP ONUPDATE CURRENT_TIMESTAMP;"` DeletedAt *time.Time `json:"deletedAt"` //NotificationPreferences ViewerNotificationPreferences `json:"notificationPreferences"` DiscussionID *string `json:"discussionID" dynamodbav:"DiscussionID" gorm:"type:varchar(36);"` Discussion *Discussion `json:"discussion" dynamodbav:"-" gorm:"-"` //gorm:"foreignkey:discussion_id;association_foreignkey:id;"` LastViewed *time.Time `json:"lastViewed"` LastViewedPostID *string `json:"lastViewedPostID" gorm:"type:varchar(36);"` LastViewedPost *Post `json:"lastViewedPost" dynamodbav:"-" gorm:"foreignKey:LastViewedPostID;"` //gorm:"foreignkey:last_post_viewed_id;association_foreignkey:id;"` // NOTE: This is not exposed currently but keeping it here for // testing purposes. We will try out exposing user information one of the tests. UserID *string `json:"userID" gorm:"type:varchar(36);"` User *User `json:"user" dynamodbav:"-" gorm:"-"` }
type ViewerNotificationPreferences ¶
type ViewerNotificationPreferences struct {
ID string `json:"id"`
}
func (ViewerNotificationPreferences) IsDiscussionNotificationPreferences ¶
func (ViewerNotificationPreferences) IsDiscussionNotificationPreferences()
type ViewersConnection ¶
type ViewersConnection struct {
// contains filtered or unexported fields
}
func (*ViewersConnection) PageInfo ¶
func (v *ViewersConnection) PageInfo() PageInfo
func (*ViewersConnection) TotalCount ¶
func (v *ViewersConnection) TotalCount() int
type ViewersEdge ¶
Source Files ¶
- discussion.go
- discussion_participant_key.go
- discussion_post_key.go
- discussion_viewer_key.go
- discussions_connection.go
- discussions_edge.go
- flair.go
- flair_template.go
- imported_content.go
- invite_request.go
- mention.go
- models.go
- models_gen.go
- moderator.go
- page_info.go
- participant.go
- post.go
- post_bookmark.go
- post_content.go
- user.go
- user_device.go
- user_profile.go
- viewer.go
Click to show internal directories.
Click to hide internal directories.