Documentation ¶
Index ¶
- Variables
- type Cost
- type CostCategory
- type CreateCostInput
- type CreateIncomeInput
- type CreatePortfolioInput
- type CreateUserInput
- type Income
- type IncomeCategory
- type Portfolio
- type PortfolioCategory
- type Privacy
- type Role
- type UpdateCostInput
- type UpdateIncomeInput
- func (c UpdateIncomeInput) GetAmount() *int
- func (c UpdateIncomeInput) GetCategory() *PortfolioCategory
- func (c UpdateIncomeInput) GetDescription() *string
- func (c UpdateIncomeInput) GetOccurDate() *time.Time
- func (c UpdateIncomeInput) GetPrivacy() *Privacy
- func (UpdateIncomeInput) IsPortfolioInput()
- type UpdatePortfolio
- type UpdatePortfolioInput
- type UpdateUserInput
- type User
- type UserInput
Constants ¶
This section is empty.
Variables ¶
View Source
var AllCostCategory = []CostCategory{ CostCategoryInvestment, CostCategoryDaily, CostCategoryLearning, CostCategoryCharity, CostCategoryOthers, }
View Source
var AllIncomeCategory = []IncomeCategory{ IncomeCategoryInvestment, IncomeCategoryParttime, IncomeCategorySalary, IncomeCategoryOthers, }
View Source
var AllPortfolioCategory = []PortfolioCategory{ PortfolioCategoryInvestment, PortfolioCategoryParttime, PortfolioCategorySalary, PortfolioCategoryDaily, PortfolioCategoryLearning, PortfolioCategoryCharity, PortfolioCategoryOthers, }
View Source
var AllPrivacy = []Privacy{ PrivacyPublic, PrivacyFriend, PrivacyPrivate, }
View Source
var AllRole = []Role{ RoleAdmin, RoleUser, }
Functions ¶
This section is empty.
Types ¶
type Cost ¶
type Cost struct { ID string `json:"id"` Owner string `json:"owner"` Amount int `json:"amount,string"` OccurDate time.Time `json:"occurDate"` Description string `json:"description"` Vote []string `json:"vote"` Category PortfolioCategory `json:"category"` Privacy Privacy `json:"privacy"` }
func (Cost) IsPortfolio ¶
func (Cost) IsPortfolio()
type CostCategory ¶
type CostCategory string
const ( CostCategoryInvestment CostCategory = "INVESTMENT" CostCategoryDaily CostCategory = "DAILY" CostCategoryLearning CostCategory = "LEARNING" CostCategoryCharity CostCategory = "CHARITY" CostCategoryOthers CostCategory = "OTHERS" )
func (CostCategory) IsValid ¶
func (e CostCategory) IsValid() bool
func (CostCategory) MarshalGQL ¶
func (e CostCategory) MarshalGQL(w io.Writer)
func (CostCategory) String ¶
func (e CostCategory) String() string
func (*CostCategory) UnmarshalGQL ¶
func (e *CostCategory) UnmarshalGQL(v interface{}) error
type CreateCostInput ¶
type CreateCostInput struct { Amount int `bson:"amount,omitempty" json:"amount,string,omitempty"` OccurDate time.Time `bson:"occurDate,omitempty" json:"occurDate,omitempty"` Category CostCategory `bson:"category,omitempty" json:"category,omitempty"` Description string `bson:"description,omitempty" json:"description,omitempty"` Privacy Privacy `bson:"privacy,omitempty" json:"privacy,omitempty"` }
func (CreateCostInput) GetAmount ¶
func (c CreateCostInput) GetAmount() int
func (CreateCostInput) GetCategory ¶
func (c CreateCostInput) GetCategory() PortfolioCategory
func (CreateCostInput) GetDescription ¶
func (c CreateCostInput) GetDescription() string
func (CreateCostInput) GetOccurDate ¶
func (c CreateCostInput) GetOccurDate() time.Time
func (CreateCostInput) GetPrivacy ¶
func (c CreateCostInput) GetPrivacy() Privacy
type CreateIncomeInput ¶
type CreateIncomeInput struct { Amount int `bson:"amount,omitempty" json:"amount,string,omitempty"` OccurDate time.Time `bson:"occurDate,omitempty" json:"occurDate,omitempty"` Category IncomeCategory `bson:"category,omitempty" json:"category,omitempty"` Description string `bson:"description,omitempty" json:"description,omitempty"` Privacy Privacy `bson:"privacy,omitempty" json:"privacy,omitempty"` }
func (CreateIncomeInput) GetAmount ¶
func (c CreateIncomeInput) GetAmount() int
func (CreateIncomeInput) GetCategory ¶
func (c CreateIncomeInput) GetCategory() PortfolioCategory
func (CreateIncomeInput) GetDescription ¶
func (c CreateIncomeInput) GetDescription() string
func (CreateIncomeInput) GetOccurDate ¶
func (c CreateIncomeInput) GetOccurDate() time.Time
func (CreateIncomeInput) GetPrivacy ¶
func (c CreateIncomeInput) GetPrivacy() Privacy
type CreatePortfolioInput ¶
type CreateUserInput ¶
type Income ¶
type Income struct { ID string `json:"id"` Owner string `json:"owner"` Amount int `json:"amount,string"` OccurDate time.Time `json:"occurDate"` Description string `json:"description"` Vote []string `json:"vote"` Category PortfolioCategory `json:"category"` Privacy Privacy `json:"privacy"` }
func (Income) IsPortfolio ¶
func (Income) IsPortfolio()
type IncomeCategory ¶
type IncomeCategory string
const ( IncomeCategoryInvestment IncomeCategory = "INVESTMENT" IncomeCategoryParttime IncomeCategory = "PARTTIME" IncomeCategorySalary IncomeCategory = "SALARY" IncomeCategoryOthers IncomeCategory = "OTHERS" )
func (IncomeCategory) IsValid ¶
func (e IncomeCategory) IsValid() bool
func (IncomeCategory) MarshalGQL ¶
func (e IncomeCategory) MarshalGQL(w io.Writer)
func (IncomeCategory) String ¶
func (e IncomeCategory) String() string
func (*IncomeCategory) UnmarshalGQL ¶
func (e *IncomeCategory) UnmarshalGQL(v interface{}) error
type PortfolioCategory ¶
type PortfolioCategory string
const ( PortfolioCategoryInvestment PortfolioCategory = "INVESTMENT" PortfolioCategoryParttime PortfolioCategory = "PARTTIME" PortfolioCategorySalary PortfolioCategory = "SALARY" PortfolioCategoryDaily PortfolioCategory = "DAILY" PortfolioCategoryLearning PortfolioCategory = "LEARNING" PortfolioCategoryCharity PortfolioCategory = "CHARITY" PortfolioCategoryOthers PortfolioCategory = "OTHERS" )
func (PortfolioCategory) IsValid ¶
func (e PortfolioCategory) IsValid() bool
func (PortfolioCategory) MarshalGQL ¶
func (e PortfolioCategory) MarshalGQL(w io.Writer)
func (PortfolioCategory) String ¶
func (e PortfolioCategory) String() string
func (*PortfolioCategory) UnmarshalGQL ¶
func (e *PortfolioCategory) UnmarshalGQL(v interface{}) error
type UpdateCostInput ¶
type UpdateCostInput struct { Amount *int `bson:"amount,omitempty" json:"amount,string,omitempty"` OccurDate *time.Time `bson:"occurDate,omitempty" json:"occurDate,omitempty"` Category *CostCategory `bson:"category,omitempty" json:"category,omitempty"` Description *string `bson:"description,omitempty" json:"description,omitempty"` Privacy *Privacy `bson:"privacy,omitempty" json:"privacy,omitempty"` }
func (UpdateCostInput) GetAmount ¶
func (c UpdateCostInput) GetAmount() *int
func (UpdateCostInput) GetCategory ¶
func (c UpdateCostInput) GetCategory() *PortfolioCategory
func (UpdateCostInput) GetDescription ¶
func (c UpdateCostInput) GetDescription() *string
func (UpdateCostInput) GetOccurDate ¶
func (c UpdateCostInput) GetOccurDate() *time.Time
func (UpdateCostInput) GetPrivacy ¶
func (c UpdateCostInput) GetPrivacy() *Privacy
func (UpdateCostInput) IsPortfolioInput ¶
func (UpdateCostInput) IsPortfolioInput()
type UpdateIncomeInput ¶
type UpdateIncomeInput struct { Amount *int `bson:"amount,omitempty" json:"amount,string,omitempty"` OccurDate *time.Time `bson:"occurDate,omitempty" json:"occurDate,omitempty"` Category *IncomeCategory `bson:"category,omitempty" json:"category,omitempty"` Description *string `bson:"description,omitempty" json:"description,omitempty"` Privacy *Privacy `bson:"privacy,omitempty" json:"privacy,omitempty"` }
func (UpdateIncomeInput) GetAmount ¶
func (c UpdateIncomeInput) GetAmount() *int
func (UpdateIncomeInput) GetCategory ¶
func (c UpdateIncomeInput) GetCategory() *PortfolioCategory
func (UpdateIncomeInput) GetDescription ¶
func (c UpdateIncomeInput) GetDescription() *string
func (UpdateIncomeInput) GetOccurDate ¶
func (c UpdateIncomeInput) GetOccurDate() *time.Time
func (UpdateIncomeInput) GetPrivacy ¶
func (c UpdateIncomeInput) GetPrivacy() *Privacy
func (UpdateIncomeInput) IsPortfolioInput ¶
func (UpdateIncomeInput) IsPortfolioInput()
type UpdatePortfolio ¶
type UpdatePortfolio struct { Amount *int `bson:"amount,omitempty" json:"amount,string,omitempty"` OccurDate *time.Time `bson:"occurDate,omitempty" json:"occurDate,omitempty"` Category *PortfolioCategory `bson:"category,omitempty" json:"category,omitempty"` Description *string `bson:"description,omitempty" json:"description,omitempty"` Privacy *Privacy `bson:"privacy,omitempty" json:"privacy,omitempty"` }
type UpdatePortfolioInput ¶
type UpdateUserInput ¶
type User ¶
type User struct { ID string `json:"id"` Email string `json:"email"` UserID string `json:"userId"` NickName *string `json:"nickName"` CreatedAt time.Time `json:"createdAt"` // granted permission to friends to view portfolio Friends []string `json:"friends"` // permission to view followers portfolio Followers []string `json:"followers"` Role Role `json:"role"` }
Click to show internal directories.
Click to hide internal directories.