model

package
v0.0.0-...-0406d23 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Algorithm

type Algorithm string
const (
	AlgorithmHs256 Algorithm = "HS256"
	AlgorithmHs384 Algorithm = "HS384"
	AlgorithmHs512 Algorithm = "HS512"
	AlgorithmRs256 Algorithm = "RS256"
	AlgorithmRs384 Algorithm = "RS384"
	AlgorithmRs512 Algorithm = "RS512"
	AlgorithmEs256 Algorithm = "ES256"
	AlgorithmEs384 Algorithm = "ES384"
	AlgorithmEs512 Algorithm = "ES512"
	AlgorithmPs256 Algorithm = "PS256"
	AlgorithmPs384 Algorithm = "PS384"
	AlgorithmPs512 Algorithm = "PS512"
)

func (Algorithm) IsValid

func (e Algorithm) IsValid() bool

func (Algorithm) MarshalGQL

func (e Algorithm) MarshalGQL(w io.Writer)

func (Algorithm) String

func (e Algorithm) String() string

func (*Algorithm) UnmarshalGQL

func (e *Algorithm) UnmarshalGQL(v interface{}) error

type Api

type Api struct {
	Model       `bson:",inline"`
	Name        string  `json:"name" bson:"name"`
	Description *string `json:"description,omitempty" bson:"description,omitempty"`
	Identifier  string  `json:"identifier" bson:"identifier"`
	Algorithm   string  `json:"algorithm" bson:"algorithm"`
	Expiration  int64   `json:"expiration" bson:"expiration"`
	Status      string  `json:"status" bson:"status"`
}

func (*Api) Collection

func (i *Api) Collection() string

func (*Api) Index

func (i *Api) Index() []mongo.IndexModel

func (*Api) MarshalBSON

func (i *Api) MarshalBSON() ([]byte, error)

func (*Api) Santize

func (i *Api) Santize(s string) string

remove spacing characters

type Apis

type Apis struct {
	Data  []*Api `json:"data,omitempty"`
	Count int    `json:"count"`
}

type Attendance

type Attendance struct {
	UID string `json:"uid" bson:"uid"`
}

func (Attendance) IsEntity

func (Attendance) IsEntity()

type AuthPayload

type AuthPayload struct {
	AccessToken  *string `json:"access_token,omitempty"`
	RefreshToken *string `json:"refresh_token,omitempty"`
	ExpiresIn    *int    `json:"expires_in,omitempty"`
	TokenType    *string `json:"token_type,omitempty"`
	User         *User   `json:"user,omitempty"`
}

type Board

type Board struct {
	UID string `json:"uid" bson:"uid"`
}

func (Board) IsEntity

func (Board) IsEntity()

type Campaign

type Campaign struct {
	UID string `json:"uid" bson:"uid"`
}

func (Campaign) IsEntity

func (Campaign) IsEntity()

type Client

type Client struct {
	Model       `bson:",inline"`
	UID         *primitive.ObjectID `json:"uid,omitempty" bson:"uid,omitempty"`
	Type        string              `json:"type" bson:"type"`
	Name        string              `json:"name" bson:"name"`
	Description *string             `json:"description,omitempty" bson:"description,omitempty"`
	Secret      string              `json:"secret" bson:"secret"`
	Domain      string              `json:"domain" bson:"domain"`
	Redirect    string              `json:"redirect,omitempty" bson:"redirect,omitempty"`
	Provider    string              `json:"provider,omitempty" bson:"provider,omitempty"`
	Status      string              `json:"status" bson:"status"`
}

func (*Client) Collection

func (i *Client) Collection() string

func (*Client) Index

func (i *Client) Index() []mongo.IndexModel

func (*Client) MarshalBSON

func (i *Client) MarshalBSON() ([]byte, error)

type Clients

type Clients struct {
	Data  []*Client `json:"data,omitempty"`
	Count int       `json:"count"`
}

type Collaborator

type Collaborator struct {
	UID string `json:"uid" bson:"uid"`
}

func (Collaborator) IsEntity

func (Collaborator) IsEntity()

type Comment

type Comment struct {
	UID string `json:"uid" bson:"uid"`
}

func (Comment) IsEntity

func (Comment) IsEntity()

type Company

type Company struct {
	UID string `json:"uid" bson:"uid"`
}

func (Company) IsEntity

func (Company) IsEntity()

type Connection

type Connection struct {
	Model       `bson:",inline"`
	Name        string             `json:"name" bson:"name"`
	Description *string            `json:"description,omitempty" bson:"description,omitempty"`
	Type        string             `json:"type" bson:"type"`
	Client      primitive.ObjectID `json:"client" bson:"client"`
	Status      string             `json:"status" bson:"status"`
}

func (*Connection) Collection

func (i *Connection) Collection() string

func (*Connection) Index

func (i *Connection) Index() []mongo.IndexModel

func (*Connection) MarshalBSON

func (i *Connection) MarshalBSON() ([]byte, error)

func (*Connection) Santize

func (i *Connection) Santize(s string) string

remove spacing characters

type Connections

type Connections struct {
	Data  []*Connection `json:"data,omitempty"`
	Count int           `json:"count"`
}

type Contact

type Contact struct {
	UID string `json:"uid" bson:"uid"`
}

func (Contact) IsEntity

func (Contact) IsEntity()

type Coupon

type Coupon struct {
	UID string `json:"uid" bson:"uid"`
}

func (Coupon) IsEntity

func (Coupon) IsEntity()

type Credential

type Credential struct {
	Model   `bson:",inline"`
	UID     primitive.ObjectID  `json:"uid" bson:"uid"`
	Type    string              `json:"type" bson:"type"`
	Secret  string              `json:"secret" bson:"secret"`
	Expires primitive.Timestamp `json:"expires" bson:"expires"`
	Revoked bool                `json:"revoked" bson:"revoked"`
	Status  string              `json:"status" bson:"status"`
}

func (*Credential) Collection

func (i *Credential) Collection() string

func (*Credential) Index

func (i *Credential) Index() []mongo.IndexModel

func (*Credential) MarshalBSON

func (i *Credential) MarshalBSON() ([]byte, error)

type Expense

type Expense struct {
	UID string `json:"uid" bson:"uid"`
}

func (Expense) IsEntity

func (Expense) IsEntity()

type File

type File struct {
	UID string `json:"uid" bson:"uid"`
}

func (File) IsEntity

func (File) IsEntity()

type Goal

type Goal struct {
	UID string `json:"uid" bson:"uid"`
}

func (Goal) IsEntity

func (Goal) IsEntity()

type Identity

type Identity struct {
	Model      `bson:",inline"`
	UID        primitive.ObjectID `json:"uid" bson:"uid"`
	Provider   string             `json:"provider" bson:"provider"`
	UserID     string             `json:"user_id" bson:"user_id"`
	Connection string             `json:"connection" bson:"connection"`
	IsSocial   bool               `json:"is_social" bson:"is_social"`
	Status     string             `json:"status"`
}

func (*Identity) Collection

func (i *Identity) Collection() string

func (*Identity) Index

func (i *Identity) Index() []mongo.IndexModel

func (*Identity) MarshalBSON

func (i *Identity) MarshalBSON() ([]byte, error)

type Integration

type Integration struct {
	Model       `bson:",inline"`
	Type        string  `json:"type" bson:"type"`
	Name        string  `json:"name" bson:"name"`
	Description *string `json:"description,omitempty" bson:"description,omitempty"`
	Status      string  `json:"status" bson:"status"`
}

func (*Integration) Collection

func (i *Integration) Collection() string

func (*Integration) Index

func (i *Integration) Index() []mongo.IndexModel

func (*Integration) MarshalBSON

func (i *Integration) MarshalBSON() ([]byte, error)

func (*Integration) Santize

func (i *Integration) Santize(s string) string

remove spacing characters

type Integrations

type Integrations struct {
	Data  []*Integration `json:"data,omitempty"`
	Count int            `json:"count"`
}

type Invitation

type Invitation struct {
	Model    `bson:",inline"`
	UID      primitive.ObjectID  `json:"uid" bson:"uid"`
	Email    string              `json:"email" bson:"email"`
	Roles    []*string           `json:"roles,omitempty" bson:"roles,omitempty"`
	Status   string              `json:"status" bson:"status"`
	Expires  primitive.Timestamp `json:"expires" bson:"expires"`
	Metadata primitive.M         `json:"metadata,omitempty"`
}

func (*Invitation) Collection

func (i *Invitation) Collection() string

func (*Invitation) Index

func (i *Invitation) Index() []mongo.IndexModel

func (*Invitation) MarshalBSON

func (i *Invitation) MarshalBSON() ([]byte, error)

type InvitationStatus

type InvitationStatus string
const (
	InvitationStatusPending  InvitationStatus = "PENDING"
	InvitationStatusAccepted InvitationStatus = "ACCEPTED"
	InvitationStatusDeclined InvitationStatus = "DECLINED"
)

func (InvitationStatus) IsValid

func (e InvitationStatus) IsValid() bool

func (InvitationStatus) MarshalGQL

func (e InvitationStatus) MarshalGQL(w io.Writer)

func (InvitationStatus) String

func (e InvitationStatus) String() string

func (*InvitationStatus) UnmarshalGQL

func (e *InvitationStatus) UnmarshalGQL(v interface{}) error

type Invitations

type Invitations struct {
	Data  []*Invitation `json:"data,omitempty"`
	Count int           `json:"count"`
}

type Invoice

type Invoice struct {
	UID string `json:"uid" bson:"uid"`
}

func (Invoice) IsEntity

func (Invoice) IsEntity()

type Key

type Key struct {
	Model       `bson:",inline"`
	UID         *primitive.ObjectID  `json:"uid,omitempty" bson:"uid,omitempty"`
	Name        string               `json:"name" bson:"name"`
	Type        string               `json:"type" bson:"type"`
	Provider    string               `json:"provider" bson:"provider"`
	Certificate string               `json:"certificate" bson:"certificate"`
	Fingerprint string               `json:"fingerprint" bson:"fingerprint"`
	Thumbprint  string               `json:"thumbprint" bson:"thumbprint"`
	Expires     *primitive.Timestamp `json:"expires,omitempty" bson:"expires,omitempty"`
	Status      string               `json:"status" bson:"status"`
}

func (*Key) Collection

func (i *Key) Collection() string

func (*Key) Index

func (i *Key) Index() []mongo.IndexModel

func (*Key) MarshalBSON

func (i *Key) MarshalBSON() ([]byte, error)

type Keys

type Keys struct {
	Data  []*Key `json:"data,omitempty"`
	Count int    `json:"count"`
}
type Link struct {
	UID string `json:"uid" bson:"uid"`
}

func (Link) IsEntity

func (Link) IsEntity()

type List

type List struct {
	UID string `json:"uid" bson:"uid"`
}

func (List) IsEntity

func (List) IsEntity()

type Login

type Login struct {
	Username     string  `json:"username"`
	Password     string  `json:"password"`
	GrantType    *string `json:"grant_type,omitempty"`
	Scope        *string `json:"scope,omitempty"`
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`
}

type Member

type Member struct {
	Model     `bson:",inline"`
	UID       primitive.ObjectID `json:"uid" bson:"uid"`
	Workspace primitive.ObjectID `json:"workspace" bson:"workspace"`
	Status    string             `json:"status" bson:"status"`
}

func (*Member) Collection

func (i *Member) Collection() string

func (*Member) Index

func (i *Member) Index() []mongo.IndexModel

func (Member) IsEntity

func (Member) IsEntity()

func (*Member) MarshalBSON

func (i *Member) MarshalBSON() ([]byte, error)

type Membership

type Membership struct {
	UID  string `json:"uid"`
	User *User  `json:"user,omitempty"`
}

func (Membership) IsEntity

func (Membership) IsEntity()

type Model

type Model struct {
	ID        primitive.ObjectID  `json:"id,omitempty" bson:"_id,omitempty"`
	Metadata  primitive.M         `json:"metadata,omitempty" bson:"metadata,omitempty"`
	Created   primitive.Timestamp `json:"created,omitempty" bson:"created,omitempty"`
	Updated   primitive.Timestamp `json:"updated,omitempty" bson:"updated,omitempty"`
	Deleted   primitive.Timestamp `json:"deleted,omitempty" bson:"deleted,omitempty"`
	Timestamp primitive.Timestamp `json:"timestamp,omitempty" bson:"timestamp,omitempty"`
}

type NewAPI

type NewAPI struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Identifier  string                 `json:"identifier"`
	Algorithm   Algorithm              `json:"algorithm"`
	Expiration  int                    `json:"expiration"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type NewClient

type NewClient struct {
	Name        string                 `json:"name"`
	Description *string                `json:"description,omitempty"`
	Domain      *string                `json:"domain,omitempty"`
	Redirect    *string                `json:"redirect,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type NewConnection

type NewConnection struct {
	Client      string                 `json:"client"`
	Name        string                 `json:"name"`
	Description *string                `json:"description,omitempty"`
	Type        string                 `json:"type"`
	Status      string                 `json:"status"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type NewCredential

type NewCredential struct {
	Type     string                 `json:"type"`
	Secret   string                 `json:"secret"`
	Expires  string                 `json:"expires"`
	Status   string                 `json:"status"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type NewIdentity

type NewIdentity struct {
	UserID     string                 `json:"user_id"`
	Provider   string                 `json:"provider"`
	Connection string                 `json:"connection"`
	IsSocial   bool                   `json:"is_social"`
	Metadata   map[string]interface{} `json:"metadata,omitempty"`
	Status     string                 `json:"status"`
}

type NewIntegration

type NewIntegration struct {
	Name        string                 `json:"name"`
	Description *string                `json:"description,omitempty"`
	Type        string                 `json:"type"`
	Status      string                 `json:"status"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type NewInvitation

type NewInvitation struct {
	Email    string                 `json:"email"`
	Roles    []*string              `json:"roles,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type NewKey

type NewKey struct {
	Name string `json:"name"`
}

type NewPermission

type NewPermission struct {
	Name        string  `json:"name"`
	Description *string `json:"description,omitempty"`
}

type NewRole

type NewRole struct {
	Name        string    `json:"name"`
	Description *string   `json:"description,omitempty"`
	Permissions []*string `json:"permissions,omitempty"`
}

type NewUser

type NewUser struct {
	Name       string    `json:"name"`
	GivenName  *string   `json:"given_name,omitempty"`
	FamilyName *string   `json:"family_name,omitempty"`
	Email      string    `json:"email"`
	Phone      *string   `json:"phone,omitempty"`
	Password   string    `json:"password"`
	Roles      []*string `json:"roles,omitempty"`
	Timezone   *string   `json:"timezone,omitempty"`
	Locale     *string   `json:"locale,omitempty"`
	Picture    *string   `json:"picture,omitempty"`
	Status     *string   `json:"status,omitempty"`
}

type NewWorkspace

type NewWorkspace struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type Order

type Order struct {
	UID  string `json:"uid"`
	User *User  `json:"user,omitempty"`
}

func (Order) IsEntity

func (Order) IsEntity()

type Organization

type Organization struct {
	UID  string `json:"uid"`
	User *User  `json:"user,omitempty"`
}

func (Organization) IsEntity

func (Organization) IsEntity()

type Payload

type Payload struct {
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	TokenType    string `json:"token_type"`
	User         *User  `json:"user"`
}

type Permission

type Permission struct {
	Model       `bson:",inline"`
	Api         primitive.ObjectID `json:"api" bson:"api"`
	Name        string             `json:"name" bson:"name"`
	Description *string            `json:"description,omitempty" bson:"description,omitempty"`
}

func (*Permission) Collection

func (i *Permission) Collection() string

func (*Permission) Index

func (i *Permission) Index() []mongo.IndexModel

func (*Permission) MarshalBSON

func (i *Permission) MarshalBSON() ([]byte, error)

func (*Permission) Santize

func (i *Permission) Santize(s string) string

remove spacing characters

type Permissions

type Permissions struct {
	Data  []*Permission `json:"data,omitempty"`
	Count int           `json:"count"`
}

type Portfolio

type Portfolio struct {
	UID string `json:"uid" bson:"uid"`
}

func (Portfolio) IsEntity

func (Portfolio) IsEntity()

type Post

type Post struct {
	UID string `json:"uid" bson:"uid"`
}

func (Post) IsEntity

func (Post) IsEntity()

type Quote

type Quote struct {
	UID  string `json:"uid"`
	User *User  `json:"user,omitempty"`
}

func (Quote) IsEntity

func (Quote) IsEntity()

type Reaction

type Reaction struct {
	UID string `json:"uid" bson:"uid"`
}

func (Reaction) IsEntity

func (Reaction) IsEntity()

type Register

type Register struct {
	Name                 string  `json:"name"`
	Email                string  `json:"email"`
	Password             string  `json:"password"`
	PasswordConfirmation string  `json:"password_confirmation"`
	ClientID             *string `json:"client_id,omitempty"`
}

type ResetPassword

type ResetPassword struct {
	Token                string `json:"token"`
	Password             string `json:"password"`
	PasswordConfirmation string `json:"password_confirmation"`
}

type Role

type Role struct {
	Model       `bson:",inline"`
	Name        string                `json:"name" bson:"name"`
	Description *string               `json:"description,omitempty" bson:"description,omitempty"`
	Permissions []*primitive.ObjectID `json:"permissions" bson:"permissions"`
}

func (*Role) Collection

func (i *Role) Collection() string

func (*Role) Index

func (i *Role) Index() []mongo.IndexModel

func (*Role) MarshalBSON

func (i *Role) MarshalBSON() ([]byte, error)

func (*Role) Santize

func (i *Role) Santize(s string) string

remove spacing characters

type Roles

type Roles struct {
	Data  []*Role `json:"data,omitempty"`
	Count int     `json:"count"`
}

type Share

type Share struct {
	UID string `json:"uid" bson:"uid"`
}

func (Share) IsEntity

func (Share) IsEntity()

type SocialLogin

type SocialLogin struct {
	ClientID     string  `json:"client_id"`
	ClientSecret *string `json:"client_secret,omitempty"`
	Provider     string  `json:"provider"`
	Token        string  `json:"token"`
}

type SocialProvider

type SocialProvider string
const (
	SocialProviderFacebook SocialProvider = "FACEBOOK"
	SocialProviderGoogle   SocialProvider = "GOOGLE"
	SocialProviderTwitter  SocialProvider = "TWITTER"
	SocialProviderGithub   SocialProvider = "GITHUB"
)

func (SocialProvider) IsValid

func (e SocialProvider) IsValid() bool

func (SocialProvider) MarshalGQL

func (e SocialProvider) MarshalGQL(w io.Writer)

func (SocialProvider) String

func (e SocialProvider) String() string

func (*SocialProvider) UnmarshalGQL

func (e *SocialProvider) UnmarshalGQL(v interface{}) error

type Task

type Task struct {
	UID      string   `json:"uid" bson:"uid"`
	Assignee string   `json:"assignee,omitempty" bson:"assignee,omitempty"`
	Shares   []string `json:"shares,omitempty" bson:"shares,omitempty"`
}

func (Task) IsEntity

func (Task) IsEntity()

type Token

type Token struct {
	Model     `bson:",inline"`
	UID       primitive.ObjectID  `json:"uid" bson:"uid"`
	Client    primitive.ObjectID  `json:"client" bson:"client"`
	Token     string              `json:"token" bson:"token"`
	Expires   primitive.Timestamp `json:"expires" bson:"expires"`
	Revoked   bool                `json:"revoked" bson:"revoked"`
	LastUsed  primitive.Timestamp `json:"last_used" bson:"last_used"`
	ClientIP  string              `json:"client_ip" bson:"client_ip"`
	UserAgent string              `json:"user_agent" bson:"user_agent"`
	Status    string              `json:"status" bson:"status"`
}

func (*Token) Collection

func (i *Token) Collection() string

func (*Token) Index

func (i *Token) Index() []mongo.IndexModel

func (*Token) MarshalBSON

func (i *Token) MarshalBSON() ([]byte, error)

type UpdateAPI

type UpdateAPI struct {
	Name        *string                `json:"name,omitempty"`
	Description *string                `json:"description,omitempty"`
	Identifier  *string                `json:"identifier,omitempty"`
	Algorithm   *Algorithm             `json:"algorithm,omitempty"`
	Expiration  *int                   `json:"expiration,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateClient

type UpdateClient struct {
	Name        *string                `json:"name,omitempty"`
	Description *string                `json:"description,omitempty"`
	Domain      *string                `json:"domain,omitempty"`
	Redirect    *string                `json:"redirect,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateConnection

type UpdateConnection struct {
	Name        *string                `json:"name,omitempty"`
	Description *string                `json:"description,omitempty"`
	Status      *string                `json:"status,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateCredential

type UpdateCredential struct {
	Type     *string                `json:"type,omitempty"`
	Secret   *string                `json:"secret,omitempty"`
	Expires  *string                `json:"expires,omitempty"`
	Revoked  *bool                  `json:"revoked,omitempty"`
	Status   *string                `json:"status,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateIntegration

type UpdateIntegration struct {
	Name        *string                `json:"name,omitempty"`
	Description *string                `json:"description,omitempty"`
	Type        *string                `json:"type,omitempty"`
	Status      *string                `json:"status,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateInvitation

type UpdateInvitation struct {
	Roles  []string `json:"roles"`
	Status *string  `json:"status,omitempty"`
}

type UpdatePassword

type UpdatePassword struct {
	OldPassword          string  `json:"old_password"`
	Password             string  `json:"password"`
	PasswordConfirmation *string `json:"password_confirmation,omitempty"`
}

type UpdatePermission

type UpdatePermission struct {
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
}

type UpdateRole

type UpdateRole struct {
	Name        *string   `json:"name,omitempty"`
	Description *string   `json:"description,omitempty"`
	Permissions []*string `json:"permissions,omitempty"`
}

type UpdateUser

type UpdateUser struct {
	Name       *string                `json:"name,omitempty"`
	GivenName  *string                `json:"given_name,omitempty"`
	FamilyName *string                `json:"family_name,omitempty"`
	Roles      []*string              `json:"roles,omitempty"`
	Timezone   *string                `json:"timezone,omitempty"`
	Locale     *string                `json:"locale,omitempty"`
	Picture    *string                `json:"picture,omitempty"`
	Status     *string                `json:"status,omitempty"`
	Metadata   map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateWorkspace

type UpdateWorkspace struct {
	Name        *string                `json:"name,omitempty"`
	Description *string                `json:"description,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type User

type User struct {
	Model         `bson:",inline"`
	Name          string               `json:"name" bson:"name"`
	GivenName     *string              `json:"given_name,omitempty" bson:"given_name,omitempty"`
	FamilyName    *string              `json:"family_name,omitempty" bson:"family_name,omitempty"`
	Email         string               `json:"email" bson:"email"`
	Phone         *string              `json:"phone,omitempty" bson:"phone,omitempty"`
	Roles         []*string            `json:"roles,omitempty" bson:"roles,omitempty"`
	Locale        *string              `json:"locale,omitempty" bson:"locale,omitempty"`
	Timezone      *string              `json:"timezone,omitempty" bson:"timezone,omitempty"`
	Picture       *string              `json:"picture,omitempty" bson:"picture,omitempty"`
	LastLogin     *primitive.Timestamp `json:"last_login,omitempty" bson:"last_login,omitempty"`
	LastActivity  *primitive.Timestamp `json:"last_activity,omitempty" bson:"last_activity,omitempty"`
	LastIP        *string              `json:"last_ip,omitempty" bson:"last_ip,omitempty"`
	EmailVerified *bool                `json:"email_verified,omitempty" bson:"email_verified,omitempty"`
	PhoneVerified *bool                `json:"phone_verified,omitempty" bson:"phone_verified,omitempty"`
	Status        *string              `json:"status" bson:"status"`
}

func (*User) Collection

func (i *User) Collection() string

func (*User) Document

func (i *User) Document() map[string]interface{}

func (*User) Index

func (i *User) Index() []mongo.IndexModel

func (User) IsEntity

func (User) IsEntity()

func (*User) MarshalBSON

func (i *User) MarshalBSON() ([]byte, error)

func (*User) Santize

func (i *User) Santize(s string) string

remove spacing characters

func (*User) Schema

func (i *User) Schema() interface{}

type UserStatus

type UserStatus string
const (
	UserStatusActive    UserStatus = "ACTIVE"
	UserStatusInactive  UserStatus = "INACTIVE"
	UserStatusSuspended UserStatus = "SUSPENDED"
	UserStatusPending   UserStatus = "PENDING"
)

func (UserStatus) IsValid

func (e UserStatus) IsValid() bool

func (UserStatus) MarshalGQL

func (e UserStatus) MarshalGQL(w io.Writer)

func (UserStatus) String

func (e UserStatus) String() string

func (*UserStatus) UnmarshalGQL

func (e *UserStatus) UnmarshalGQL(v interface{}) error

type Users

type Users struct {
	Count int     `json:"count"`
	Data  []*User `json:"data,omitempty"`
}

type Verify

type Verify struct {
	Code string `json:"code"`
	Type string `json:"type"`
}

type Wishlist

type Wishlist struct {
	UID  string `json:"uid"`
	User *User  `json:"user,omitempty"`
}

func (Wishlist) IsEntity

func (Wishlist) IsEntity()

type Workspace

type Workspace struct {
	Model       `bson:",inline"`
	UID         *primitive.ObjectID `json:"uid,omitempty" bson:"uid,omitempty"`
	Name        string              `json:"name" bson:"name"`
	Description *string             `json:"description,omitempty" bson:"description,omitempty"`
	Status      string              `json:"status" bson:"status"`
}

func (*Workspace) Collection

func (i *Workspace) Collection() string

func (*Workspace) Index

func (i *Workspace) Index() []mongo.IndexModel

func (*Workspace) MarshalBSON

func (i *Workspace) MarshalBSON() ([]byte, error)

type Workspaces

type Workspaces struct {
	Data  []*Workspace `json:"data,omitempty"`
	Count int          `json:"count"`
}

Jump to

Keyboard shortcuts

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