generated

package
v0.0.0-...-a6f3855 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	AuthResult struct {
		Status func(childComplexity int) int
		Token  func(childComplexity int) int
	}

	Chatroom struct {
		ID       func(childComplexity int) int
		Messages func(childComplexity int) int
		Name     func(childComplexity int) int
	}

	Devices struct {
		AppID      func(childComplexity int) int
		DeviceName func(childComplexity int) int
		ID         func(childComplexity int) int
	}

	InstatntMessage struct {
		ID      func(childComplexity int) int
		Message func(childComplexity int) int
		Name    func(childComplexity int) int
	}

	Message struct {
		CreatedAt func(childComplexity int) int
		CreatedBy func(childComplexity int) int
		ID        func(childComplexity int) int
		Text      func(childComplexity int) int
	}

	Mutation struct {
		EmailAuthLogin       func(childComplexity int, email string, password string) int
		ForgotPassword       func(childComplexity int) int
		NewRoom              func(childComplexity int, roomName string) int
		NewUsr               func(childComplexity int, input model.NewUsrInput) int
		PopAllChats          func(childComplexity int) int
		Post                 func(childComplexity int, text string, username string, roomName string) int
		RemoveAllUsrs        func(childComplexity int) int
		UpdateProfileStarter func(childComplexity int, input model.ProfileStarterInput) int
	}

	Notifications struct {
		ID   func(childComplexity int) int
		Text func(childComplexity int) int
		Type func(childComplexity int) int
	}

	Profile struct {
		Complete   func(childComplexity int) int
		ID         func(childComplexity int) int
		Name       func(childComplexity int) int
		Phone      func(childComplexity int) int
		ProfilePic func(childComplexity int) int
		Username   func(childComplexity int) int
	}

	ProfileUpdateResult struct {
		Message func(childComplexity int) int
		Stat    func(childComplexity int) int
	}

	Query struct {
		AllMessages        func(childComplexity int) int
		AllRooms           func(childComplexity int) int
		AllRoomsList       func(childComplexity int) int
		AllUsrs            func(childComplexity int) int
		Room               func(childComplexity int, name string) int
		SecureInfo         func(childComplexity int) int
		SingleRoomMessages func(childComplexity int, room string) int
		UserData           func(childComplexity int) int
	}

	Subscription struct {
		MessageAdded     func(childComplexity int, roomName string, username string) int
		NewRoomAdded     func(childComplexity int) int
		RoomNotification func(childComplexity int) int
		UsersNotified    func(childComplexity int) int
	}

	User struct {
		Email       func(childComplexity int) int
		ID          func(childComplexity int) int
		IsVerified  func(childComplexity int) int
		Password    func(childComplexity int) int
		Profile     func(childComplexity int) int
		Qrcode      func(childComplexity int) int
		UserDevices func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	User func(ctx context.Context, obj interface{}, next graphql.Resolver, username string) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	RemoveAllUsrs(ctx context.Context) (bool, error)
	NewUsr(ctx context.Context, input model.NewUsrInput) (string, error)
	EmailAuthLogin(ctx context.Context, email string, password string) (*model.AuthResult, error)
	UpdateProfileStarter(ctx context.Context, input model.ProfileStarterInput) (*model.ProfileUpdateResult, error)
	ForgotPassword(ctx context.Context) (bool, error)
	Post(ctx context.Context, text string, username string, roomName string) (*model.Message, error)
	PopAllChats(ctx context.Context) (bool, error)
	NewRoom(ctx context.Context, roomName string) (*model.Chatroom, error)
}

type QueryResolver

type QueryResolver interface {
	AllUsrs(ctx context.Context) ([]*model.User, error)
	SecureInfo(ctx context.Context) (string, error)
	UserData(ctx context.Context) (*model.User, error)
	Room(ctx context.Context, name string) (*model.Chatroom, error)
	AllRoomsList(ctx context.Context) ([]*model.Chatroom, error)
	AllRooms(ctx context.Context) ([]*model.InstatntMessage, error)
	AllMessages(ctx context.Context) ([]*model.Chatroom, error)
	SingleRoomMessages(ctx context.Context, room string) ([]*model.Message, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
	Subscription() SubscriptionResolver
}

type SubscriptionResolver

type SubscriptionResolver interface {
	UsersNotified(ctx context.Context) (<-chan *model.Notifications, error)
	MessageAdded(ctx context.Context, roomName string, username string) (<-chan *model.Message, error)
	RoomNotification(ctx context.Context) (<-chan *model.Notifications, error)
	NewRoomAdded(ctx context.Context) (<-chan *model.Chatroom, error)
}

Jump to

Keyboard shortcuts

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