Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InviteCode ¶
type RefreshToken ¶
type RefreshToken struct { // ID is unique per refresh token and used to identify the token claims ID primitive.ObjectID `json:"id" bson:"_id"` UserID string `json:"userID" bson:"userID"` CreatedAt primitive.Timestamp `json:"createdAt" bson:"createdAt"` ExpiresAt primitive.Timestamp `json:"expiresAt,omitempty" bson:"expiresAt,omitempty"` // when the refresh token is invalidated, it gets an invalidated at date InvalidatedAt primitive.Timestamp `json:"invalidatedAt,omitempty" bson:"invalidatedAt,omitempty"` }
type StaffMember ¶
type StaffMember struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` Name string `json:"name" bson:"name,omitempty"` Email string `json:"email" bson:"email,omitempty"` EmailVerified bool `json:"emailVerified" bson:"emailVerified,omitempty"` Role StaffRole `json:"role" bson:"role,omitempty"` HashedPassword string `json:"password" bson:"password,omitempty"` InviteCode InviteCode `json:"inviteCode" bson:"inviteCode,omitempty"` CreatedAt primitive.Timestamp `json:"createdAt" bson:"createdAt,omitempty"` UpdatedAt primitive.Timestamp `json:"updatedAt" bson:"updatedAt,omitempty"` DeletedAt primitive.Timestamp `json:"deletedAt" bson:"deletedAt,omitempty"` }
StaffMember struct StaffMember/Admin members within the CMS
type StaffRole ¶
type StaffRole string
const ( // The owner of the site, usually the person who created the site StaffRoleOwner StaffRole = "OWNER" // Trusted staff user who should be able to manage all content and users, as well // as site settings and options. StaffRoleAdministrator StaffRole = "ADMINISTRATOR" // Can invite and manage other Authors and Contributors, as well as edit and // publish any posts on the site. StaffRoleEditor StaffRole = "EDITOR" // A trusted user who can create, edit and publish their own posts, but can’t // modify others. StaffRoleAuthor StaffRole = "AUTHOR" )
func StaffRoleFromString ¶
Click to show internal directories.
Click to hide internal directories.