consoleql

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: AGPL-3.0 Imports: 9 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"
	// 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"
	// FieldName is a field name for "name"
	FieldName = "name"
	// 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"

	// 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"
)
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"
	// TokenQuery is a query name for token
	TokenQuery = "token"
)
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 (
	// 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
	LetUsKnowLink 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) APIKeyInfo

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

APIKeyInfo returns instance of satellite.APIKeyInfo *graphql.Object

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) CreateAPIKey

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

CreateAPIKey encapsulates api key and key info returns *graphql.Object

func (*TypeCreator) Project

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

Project returns instance of satellite.Project *graphql.Object

func (*TypeCreator) ProjectInput

func (c *TypeCreator) ProjectInput() *graphql.InputObject

ProjectInput returns instance of ProjectInfo *graphql.Object

func (*TypeCreator) ProjectMember

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

ProjectMember returns instance of projectMember *graphql.Object

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

func (*TypeCreator) Token

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

Token returns *graphql.Object which encapsulates User and token string

func (*TypeCreator) User

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

User returns instance of satellite.User *graphql.Object

func (*TypeCreator) UserInput

func (c *TypeCreator) UserInput() *graphql.InputObject

UserInput returns instance of UserInput *graphql.Object

type Types

type Types interface {
	RootQuery() *graphql.Object
	RootMutation() *graphql.Object

	Token() *graphql.Object

	User() *graphql.Object
	Project() *graphql.Object
	ProjectMember() *graphql.Object
	APIKeyInfo() *graphql.Object
	CreateAPIKey() *graphql.Object

	UserInput() *graphql.InputObject
	ProjectInput() *graphql.InputObject
}

Types return graphql type objects

Jump to

Keyboard shortcuts

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