Documentation ¶
Index ¶
- Variables
- func EncodeCursor(s string) string
- func StatementType2Uint8(node ast.StmtNode) uint8
- func SubscriptionAuth(ctx context.Context, requires []gqlapi.RoleEnum) (user *models.User, err error)
- type Resolver
- func (r *Resolver) Comment() gqlapi.CommentResolver
- func (r *Resolver) Log() gqlapi.LogResolver
- func (r *Resolver) MutationRoot() gqlapi.MutationRootResolver
- func (r *Resolver) Query() gqlapi.QueryResolver
- func (r *Resolver) QueryRoot() gqlapi.QueryRootResolver
- func (r *Resolver) RequestCols(fields []graphql.CollectedField, model interface{}) (columns []string)
- func (r *Resolver) Role() gqlapi.RoleResolver
- func (r *Resolver) Statement() gqlapi.StatementResolver
- func (r *Resolver) SubscriptionRoot() gqlapi.SubscriptionRootResolver
- func (r *Resolver) Ticket() gqlapi.TicketResolver
- func (r *Resolver) User() gqlapi.UserResolver
Constants ¶
This section is empty.
Variables ¶
View Source
var TicketSub struct { sync.RWMutex Subscribers map[string]chan *gqlapi.TicketStatusChangePayload }
TicketSub 为每个订阅的用户分配一个通道,所以用UserUUID做键就可以了
Functions ¶
func StatementType2Uint8 ¶
StatementType2Uint8 generates a label for a statement.
Types ¶
type Resolver ¶
type Resolver struct{}
Resolver resolver
func (*Resolver) MutationRoot ¶
func (r *Resolver) MutationRoot() gqlapi.MutationRootResolver
MutationRoot TODO: 添加描述
func (*Resolver) QueryRoot ¶
func (r *Resolver) QueryRoot() gqlapi.QueryRootResolver
QueryRoot TODO: 添加描述
func (*Resolver) RequestCols ¶
func (r *Resolver) RequestCols(fields []graphql.CollectedField, model interface{}) (columns []string)
RequestCols TODO: 有问题
func (*Resolver) Statement ¶
func (r *Resolver) Statement() gqlapi.StatementResolver
Statement TODO: 添加描述
func (*Resolver) SubscriptionRoot ¶
func (r *Resolver) SubscriptionRoot() gqlapi.SubscriptionRootResolver
SubscriptionRoot TODO: 添加描述
Source Files ¶
- resolver.go
- resolver_avatar.go
- resolver_cluster.go
- resolver_comment.go
- resolver_cron.go
- resolver_glossary.go
- resolver_log.go
- resolver_option.go
- resolver_query.go
- resolver_role.go
- resolver_rule.go
- resolver_statement.go
- resolver_statistic.go
- resolver_subscription.go
- resolver_template.go
- resolver_ticket.go
- resolver_user.go
Click to show internal directories.
Click to hide internal directories.