Documentation ¶
Index ¶
- func ConvertToImageType(filetype string) string
- func ProjectHeaderString() []string
- func ProjectsToTable(ps []Project, webDomain string, w io.Writer) *tablewriter.Table
- func UserHeaderString() []string
- type CloudPath
- type Downloadable
- type DownloadsConnection
- type Endpoints
- type Error
- type Image
- type ImportedModel
- type MembershipInfo
- type MembershipPlanCoupon
- type MetaFile
- type Model
- type PageInfo
- type Project
- type ProjectImage
- type STS
- type Task
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToImageType ¶
ConvertToImageType converts file extension type to gql image type.
func ProjectHeaderString ¶
func ProjectHeaderString() []string
ProjectHeaderString gives a row of string for the table header.
func ProjectsToTable ¶
ProjectsToTable transforms slice of projects into a table.
func UserHeaderString ¶
func UserHeaderString() []string
UserHeaderString gives a row of string for the table header.
Types ¶
type Downloadable ¶
Downloadable represents the gql 'Downloadable' type.
type DownloadsConnection ¶
type DownloadsConnection struct { TotalCount int Edges []struct { Node Downloadable } }
DownloadsConnection represents the gql 'DownloadsConnection' type.
type ImportedModel ¶
ImportedModel represents the gql 'ImportedModel' type.
type MembershipInfo ¶
type MembershipInfo struct { State string `json:"state"` PlanName string `json:"planName"` Period int `json:"period"` StartDate time.Time `json:"startDate"` EndDate time.Time `json:"endDate"` MemberGPQuota float64 `json:"memberGPQuota"` CoinPerGP float64 `json:"coinPerGP"` AssetStorage float64 `json:"assetStorage"` Visibility []string `json:"visibility"` Coupon MembershipPlanCoupon `json:"coupon"` ModelPerProject int `json:"modelPerProject"` CollaboratorQuota int `json:"collaboratorQuota"` ForceWatermark bool `json:"forceWaterMark"` }
MembershipInfo represents the gql MembershipInfo type.
type MembershipPlanCoupon ¶
type MembershipPlanCoupon struct { Value int `json:"value"` Repeat int `json:"repeat"` ValidMonth int `json:"validMonth"` }
MembershipPlanCoupon represents the gql MEMBERSHIP_PLAN_COUPON type.
func (MembershipPlanCoupon) String ¶
func (c MembershipPlanCoupon) String() string
type MetaFile ¶
type MetaFile struct { ID string State string Name string Filename string Filesize float64 Date time.Time Checksum string Error []string }
MetaFile represents the gql 'ProjectMetaFile' type.
type Project ¶
type Project struct { ID string Name string IsImported bool ImportedState string ProjectType string NumImage int GigaPixel float64 TaskState string Date time.Time CloudPath []CloudPath Downloads DownloadsConnection }
Project represents the gql project type.
type ProjectImage ¶
type ProjectImage struct { ID string State string URL string Grounded bool Name string Filename string }
ProjectImage represents the gql ProjectImage type.
type STS ¶
type STS struct { ID string Secret string Token string Bucket string Endpoint string Expire string }
STS represents the STS credentials returned from api server.
type Task ¶
type Task struct { ID string TaskType string State string StartDate time.Time EndDate time.Time TotalSteps int Step int Queueing int }
Task represents the gql 'Task' type.
type User ¶
type User struct { Email string Name string Username string Balance float64 FreeGPQuota float64 Country string Stats struct { Star int Project int Planet int Follower int // Number of fans following me Following int // Number of users I am following } MembershipState string // NA, ACTIVE, SUSPENDED, TRIAL, EXPIRED, STOPPED Membership MembershipInfo ModelUsage float64 Developer struct { Status string // NA, UNDER_REVIEW, TRIAL, ACTIVE, INACTIVE, EXPIRED } Joined time.Time }
User represents the gql user type.
func (*User) NameOrEmail ¶
NameOrEmail gives the email if username is not set.