model

package
v0.0.0-...-9e07620 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Asset

type Asset struct {
	ID          string             `json:"id"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	Type        AssetType          `json:"type"`
	EventCaps   []*EventCapability `json:"eventCaps"`
	ImageURL    string             `json:"imageUrl"`
	Disabled    bool               `json:"disabled"`
	CreatedAt   string             `json:"createdAt"`
	UpdatedAt   *string            `json:"updatedAt"`
}

type AssetInput

type AssetInput struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Type        AssetType `json:"type"`
	ImageURL    string    `json:"imageUrl"`
	Disabled    bool      `json:"disabled"`
}

type AssetType

type AssetType string
const (
	AssetTypeDeleted     AssetType = "DELETED"
	AssetTypePrivate     AssetType = "PRIVATE"
	AssetTypeMembersOnly AssetType = "MEMBERS_ONLY"
	AssetTypePublic      AssetType = "PUBLIC"
	AssetTypeCommercial  AssetType = "COMMERCIAL"
)

func (AssetType) IsValid

func (e AssetType) IsValid() bool

func (AssetType) MarshalGQL

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

func (AssetType) String

func (e AssetType) String() string

func (*AssetType) UnmarshalGQL

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

type EventCapability

type EventCapability struct {
	ID          string `json:"id"`
	Code        int    `json:"code"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Member

type Member struct {
	ID        string       `json:"id"`
	User      *User        `json:"user"`
	Disabled  bool         `json:"disabled"`
	Roles     []MemberRole `json:"roles"`
	CreatedAt string       `json:"createdAt"`
	UpdatedAt *string      `json:"updatedAt"`
}

type MemberInput

type MemberInput struct {
	UserID string       `json:"userId"`
	Roles  []MemberRole `json:"roles"`
}

type MemberRole

type MemberRole string
const (
	MemberRoleOwner    MemberRole = "OWNER"
	MemberRoleAdmin    MemberRole = "ADMIN"
	MemberRoleTeammate MemberRole = "TEAMMATE"
)

func (MemberRole) IsValid

func (e MemberRole) IsValid() bool

func (MemberRole) MarshalGQL

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

func (MemberRole) String

func (e MemberRole) String() string

func (*MemberRole) UnmarshalGQL

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

type Organization

type Organization struct {
	ID          string    `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Type        AssetType `json:"type"`
	Wallet      *Wallet   `json:"wallet"`
	Assets      []*Asset  `json:"assets"`
	Members     []*Member `json:"members"`
	CreatedAt   string    `json:"createdAt"`
	UpdatedAt   *string   `json:"updatedAt"`
}

type OrganizationInput

type OrganizationInput struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Type        AssetType `json:"type"`
	WalletID    *string   `json:"walletId"`
}

type Session

type Session struct {
	ID        string  `json:"id"`
	Active    bool    `json:"active"`
	User      *User   `json:"user"`
	Asset     *Asset  `json:"asset"`
	CreatedAt string  `json:"createdAt"`
	UpdatedAt *string `json:"updatedAt"`
}

type SessionInput

type SessionInput struct {
	UserID   string  `json:"userId"`
	AssetID  string  `json:"assetId"`
	Active   bool    `json:"active"`
	WalletID *string `json:"walletId"`
}

type User

type User struct {
	ID        string  `json:"id"`
	Name      string  `json:"name"`
	FirstName string  `json:"firstName"`
	LastName  string  `json:"lastName"`
	NickName  string  `json:"nickName"`
	AvatarURL string  `json:"avatarUrl"`
	Email     string  `json:"email"`
	Wallet    *Wallet `json:"wallet"`
	Disabled  bool    `json:"disabled"`
	CreatedAt string  `json:"createdAt"`
	UpdatedAt *string `json:"updatedAt"`
}

func (*User) FromDB

func (u *User) FromDB(d db.User)

type UserInput

type UserInput struct {
	Name      string  `json:"name"`
	Email     string  `json:"email"`
	FirstName string  `json:"firstName"`
	LastName  string  `json:"lastName"`
	NickName  string  `json:"nickName"`
	AvatarURL string  `json:"avatarUrl"`
	WalletID  *string `json:"walletId"`
	Disabled  bool    `json:"disabled"`
}

func (*UserInput) ToDB

func (u *UserInput) ToDB() (db.User, []string, error)

type Wallet

type Wallet struct {
	ID         string `json:"id"`
	EthAddress string `json:"ethAddress"`
}

type WalletInput

type WalletInput struct {
	EthAddress string `json:"ethAddress"`
}

Jump to

Keyboard shortcuts

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