consoleql

package
v0.14.7 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: AGPL-3.0 Imports: 10 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"
)
View Source
const (
	// Mutation is graphql request that modifies data
	Mutation = "mutation"

	// CreateUserMutation is a user creation mutation name
	CreateUserMutation = "createUser"
	// UpdateAccountMutation is a mutation name for account updating
	UpdateAccountMutation = "updateAccount"
	// DeleteAccountMutation is a mutation name for account deletion
	DeleteAccountMutation = "deleteAccount"
	// ChangePasswordMutation is a mutation name for password changing
	ChangePasswordMutation = "changePassword"
	// 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"

	// 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"
)
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"
	// 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"
	// 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"
	// 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"
	// UserQuery is a query name for user
	UserQuery = "user"
	// ProjectQuery is a query name for project
	ProjectQuery = "project"
	// MyProjectsQuery is a query name for projects related to account
	MyProjectsQuery = "myProjects"
	// CreditUsageQuery is a query name for credit usage related to an user
	CreditUsageQuery = "creditUsage"
	// TokenQuery is a query name for token
	TokenQuery = "token"
	// ForgotPasswordQuery is a query name for password recovery request
	ForgotPasswordQuery = "forgotPassword"
	// ResendAccountActivationEmailQuery is a query name for password recovery request
	ResendAccountActivationEmailQuery = "resendAccountActivationEmail"
)
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"
)
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

Types

type AccountActivationEmail

type AccountActivationEmail struct {
	Origin         string
	ActivationLink 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
}

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
}

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