consoleql

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIKeyInfoType is graphql type name for api key
	APIKeyInfoType = "keyInfo"
	// CreateAPIKeyType is graphql type name for createAPIKey struct
	// which incapsulates the actual key and it's info
	CreateAPIKeyType = "graphqlCreateAPIKey"
	// FieldKey is field name for the actual key in createAPIKey
	FieldKey = "key"
)
View Source
const (
	// ActivationPath is key for path which handles account activation
	ActivationPath = "activationPath"
	// PasswordRecoveryPath is key for path which handles password recovery
	PasswordRecoveryPath = "passwordRecoveryPath"
	// CancelPasswordRecoveryPath is key for path which handles let us know sequence
	CancelPasswordRecoveryPath = "cancelPasswordRecoveryPath"
	// SignInPath is key for sign in server route
	SignInPath = "signInPath"
	// LetUsKnowURL is key to store let us know URL
	LetUsKnowURL = "letUsKnowURL"
	// ContactInfoURL is a key to store contact info URL
	ContactInfoURL = "contactInfoURL"
	// TermsAndConditionsURL is a key to store terms and conditions URL
	TermsAndConditionsURL = "termsAndConditionsURL"
)
View Source
const (
	// Mutation is graphql request that modifies data
	Mutation = "mutation"

	// CreateProjectMutation is a mutation name for project creation
	CreateProjectMutation = "createProject"
	// DeleteProjectMutation is a mutation name for project deletion
	DeleteProjectMutation = "deleteProject"
	// UpdateProjectDescriptionMutation is a mutation name for project updating
	UpdateProjectDescriptionMutation = "updateProjectDescription"

	// AddProjectMembersMutation is a mutation name for adding new project members
	AddProjectMembersMutation = "addProjectMembers"
	// DeleteProjectMembersMutation is a mutation name for deleting project members
	DeleteProjectMembersMutation = "deleteProjectMembers"

	// CreateAPIKeyMutation is a mutation name for api key creation
	CreateAPIKeyMutation = "createAPIKey"
	// DeleteAPIKeysMutation is a mutation name for api key deleting
	DeleteAPIKeysMutation = "deleteAPIKeys"

	// AddPaymentMethodMutation is mutation name for adding new payment method
	AddPaymentMethodMutation = "addPaymentMethod"
	// DeletePaymentMethodMutation is mutation name for deleting payment method
	DeletePaymentMethodMutation = "deletePaymentMethod"
	// SetDefaultPaymentMethodMutation is mutation name setting payment method as default payment method
	SetDefaultPaymentMethodMutation = "setDefaultPaymentMethod"

	// InputArg is argument name for all input types
	InputArg = "input"
	// FieldProjectID is field name for projectID
	FieldProjectID = "projectID"
	// FieldNewPassword is a field name for new password
	FieldNewPassword = "newPassword"
	// Secret is a field name for registration token for user creation during Vanguard release
	Secret = "secret"
	// ReferrerUserID is a field name for passing referrer's user id
	ReferrerUserID = "referrerUserId"
)
View Source
const (
	// ProjectType is a graphql type name for project
	ProjectType = "project"
	// ProjectInputType is a graphql type name for project input
	ProjectInputType = "projectInput"
	// ProjectUsageType is a graphql type name for project usage
	ProjectUsageType = "projectUsage"
	// BucketUsageCursorInputType is a graphql input
	// type name for bucket usage cursor
	BucketUsageCursorInputType = "bucketUsageCursor"
	// BucketUsageType is a graphql type name for bucket usage
	BucketUsageType = "bucketUsage"
	// BucketUsagePageType is a field name for bucket usage page
	BucketUsagePageType = "bucketUsagePage"
	// ProjectMembersPageType is a field name for project members page
	ProjectMembersPageType = "projectMembersPage"
	// ProjectMembersCursorInputType is a graphql type name for project members
	ProjectMembersCursorInputType = "projectMembersCursor"
	// APIKeysPageType is a field name for api keys page
	APIKeysPageType = "apiKeysPage"
	// APIKeysCursorInputType is a graphql type name for api keys
	APIKeysCursorInputType = "apiKeysCursor"
	// FieldOwnerID is a field name for "ownerId"
	FieldOwnerID = "ownerId"
	// FieldName is a field name for "name"
	FieldName = "name"
	// FieldBucketName is a field name for "bucket name"
	FieldBucketName = "bucketName"
	// FieldDescription is a field name for description
	FieldDescription = "description"
	// FieldMembers is field name for members
	FieldMembers = "members"
	// FieldAPIKeys is a field name for api keys
	FieldAPIKeys = "apiKeys"
	// FieldUsage is a field name for usage rollup
	FieldUsage = "usage"
	// FieldBucketUsages is a field name for bucket usages
	FieldBucketUsages = "bucketUsages"
	// FieldStorage is a field name for storage total
	FieldStorage = "storage"
	// FieldEgress is a field name for egress total
	FieldEgress = "egress"
	// FieldObjectCount is a field name for objects count
	FieldObjectCount = "objectCount"
	// FieldPageCount is a field name for total page count
	FieldPageCount = "pageCount"
	// FieldCurrentPage is a field name for current page number
	FieldCurrentPage = "currentPage"
	// FieldTotalCount is a field name for bucket usage count total
	FieldTotalCount = "totalCount"
	// FieldProjectMembers is a field name for project members
	FieldProjectMembers = "projectMembers"
	// CursorArg is an argument name for cursor
	CursorArg = "cursor"
	// PageArg ia an argument name for page number
	PageArg = "page"
	// LimitArg is argument name for limit
	LimitArg = "limit"
	// OffsetArg is argument name for offset
	OffsetArg = "offset"
	// SearchArg is argument name for search
	SearchArg = "search"
	// OrderArg is argument name for order
	OrderArg = "order"
	// OrderDirectionArg is argument name for order direction
	OrderDirectionArg = "orderDirection"
	// SinceArg marks start of the period
	SinceArg = "since"
	// BeforeArg marks end of the period
	BeforeArg = "before"
)
View Source
const (
	// ProjectMemberType is a graphql type name for project member
	ProjectMemberType = "projectMember"
	// FieldJoinedAt is a field name for joined at timestamp
	FieldJoinedAt = "joinedAt"
)
View Source
const (
	// Query is immutable graphql request
	Query = "query"
	// ProjectQuery is a query name for project
	ProjectQuery = "project"
	// MyProjectsQuery is a query name for projects related to account
	MyProjectsQuery = "myProjects"
	// ActiveRewardQuery is a query name for current active reward offer
	ActiveRewardQuery = "activeReward"
	// CreditUsageQuery is a query name for credit usage related to an user
	CreditUsageQuery = "creditUsage"
)
View Source
const (
	// RewardType is a graphql type for reward
	RewardType = "reward"
	// FieldAwardCreditInCent is a field name for award credit amount for referrers
	FieldAwardCreditInCent = "awardCreditInCent"
	// FieldInviteeCreditInCents is a field name for credit amount rewarded to invitees
	FieldInviteeCreditInCents = "inviteeCreditInCents"
	// FieldRedeemableCap is a field name for the total redeemable amount of the reward offer
	FieldRedeemableCap = "redeemableCap"
	// FieldAwardCreditDurationDays is a field name for the valid time frame of current award credit
	FieldAwardCreditDurationDays = "awardCreditDurationDays"
	// FieldInviteeCreditDurationDays is a field name for the valid time frame of current invitee credit
	FieldInviteeCreditDurationDays = "inviteeCreditDurationDays"
	// FieldExpiresAt is a field name for the expiration time of a reward offer
	FieldExpiresAt = "expiresAt"
	// FieldType is a field name for the type of reward offers
	FieldType = "type"
	// FieldStatus is a field name for the status of reward offers
	FieldStatus = "status"
)
View Source
const (
	// UserType is a graphql type for user
	UserType = "user"
	// UserInputType is a graphql type for user input
	UserInputType = "userInput"
	// FieldID is a field name for id
	FieldID = "id"
	// FieldEmail is a field name for email
	FieldEmail = "email"
	// FieldPassword is a field name for password
	FieldPassword = "password"
	// FieldFullName is a field name for "first name"
	FieldFullName = "fullName"
	// FieldShortName is a field name for "last name"
	FieldShortName = "shortName"
	// FieldCreatedAt is a field name for created at timestamp
	FieldCreatedAt = "createdAt"
	// FieldPartnerID is a field name for partnerID
	FieldPartnerID = "partnerId"
)
View Source
const (
	// CreditUsageType is a graphql type for user credit
	CreditUsageType = "creditUsage"
	// FieldAvailableCredit is a field name for available credit
	FieldAvailableCredit = "availableCredit"
	// FieldUsedCredit is a field name for used credit
	FieldUsedCredit = "usedCredit"
	// FieldReferred is a field name for total referred number
	FieldReferred = "referred"
)
View Source
const (
	// TokenType is graphql type name for token
	TokenType = "token"
)

Variables

This section is empty.

Functions

func CreateSchema

func CreateSchema(log *zap.Logger, service *console.Service, mailService *mailservice.Service) (schema graphql.Schema, err error)

CreateSchema creates a schema for satellites console graphql api

func HandleError added in v0.21.0

func HandleError(err error) error

HandleError returns detailed error if such error handles

Types

type AccountActivationEmail

type AccountActivationEmail struct {
	Origin                string
	ActivationLink        string
	ContactInfoURL        string
	TermsAndConditionsURL string
}

AccountActivationEmail is mailservice template with activation data

func (*AccountActivationEmail) Subject

func (*AccountActivationEmail) Subject() string

Subject gets email subject

func (*AccountActivationEmail) Template

func (*AccountActivationEmail) Template() string

Template returns email template name

type ForgotPasswordEmail

type ForgotPasswordEmail struct {
	Origin                     string
	UserName                   string
	ResetLink                  string
	CancelPasswordRecoveryLink string
	LetUsKnowURL               string
	ContactInfoURL             string
	TermsAndConditionsURL      string
}

ForgotPasswordEmail is mailservice template with reset password data

func (*ForgotPasswordEmail) Subject

func (*ForgotPasswordEmail) Subject() string

Subject gets email subject

func (*ForgotPasswordEmail) Template

func (*ForgotPasswordEmail) Template() string

Template returns email template name

type ProjectInvitationEmail

type ProjectInvitationEmail struct {
	Origin                string
	UserName              string
	ProjectName           string
	SignInLink            string
	LetUsKnowURL          string
	ContactInfoURL        string
	TermsAndConditionsURL string
}

ProjectInvitationEmail is mailservice template for project invitation email

func (*ProjectInvitationEmail) Subject

func (email *ProjectInvitationEmail) Subject() string

Subject gets email subject

func (*ProjectInvitationEmail) Template

func (*ProjectInvitationEmail) Template() string

Template returns email template name

type TypeCreator

type TypeCreator struct {
	// contains filtered or unexported fields
}

TypeCreator handles graphql type creation and error checking

func (*TypeCreator) Create

func (c *TypeCreator) Create(log *zap.Logger, service *console.Service, mailService *mailservice.Service) error

Create create types and check for error

func (*TypeCreator) RootMutation

func (c *TypeCreator) RootMutation() *graphql.Object

RootMutation returns instance of mutation *graphql.Object

func (*TypeCreator) RootQuery

func (c *TypeCreator) RootQuery() *graphql.Object

RootQuery returns instance of query *graphql.Object

Jump to

Keyboard shortcuts

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