generated

package
v0.0.0-...-ce64a08 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: Apache-2.0 Imports: 21 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 {
	EmailConfig struct {
		AuthIdentity func(childComplexity int) int
		AuthPassword func(childComplexity int) int
		AuthSecret   func(childComplexity int) int
		AuthType     func(childComplexity int) int
		AuthUsername func(childComplexity int) int
		From         func(childComplexity int) int
		Headers      func(childComplexity int) int
		SmartHost    func(childComplexity int) int
		To           func(childComplexity int) int
	}

	Matcher struct {
		Name  func(childComplexity int) int
		Type  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Message struct {
		Content func(childComplexity int) int
		Extras  func(childComplexity int) int
		Format  func(childComplexity int) int
		SendAt  func(childComplexity int) int
		Title   func(childComplexity int) int
		Topic   func(childComplexity int) int
		URL     func(childComplexity int) int
	}

	MessageConfig struct {
		Redirect func(childComplexity int) int
		Subject  func(childComplexity int) int
		To       func(childComplexity int) int
	}

	MessageFilter struct {
		AppCode  func(childComplexity int) int
		DeviceID func(childComplexity int) int
		TenantID func(childComplexity int) int
		UserID   func(childComplexity int) int
	}

	MsgAlert struct {
		Annotations func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		Deleted     func(childComplexity int) int
		EndsAt      func(childComplexity int) int
		Fingerprint func(childComplexity int) int
		ID          func(childComplexity int) int
		Labels      func(childComplexity int) int
		Nlog        func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.NlogOrder, where *ent.NlogWhereInput) int
		NlogAlerts  func(childComplexity int) int
		StartsAt    func(childComplexity int) int
		State       func(childComplexity int) int
		TenantID    func(childComplexity int) int
		Timeout     func(childComplexity int) int
		URL         func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
	}

	MsgAlertConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	MsgAlertEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	MsgChannel struct {
		Comments     func(childComplexity int) int
		CreatedAt    func(childComplexity int) int
		CreatedBy    func(childComplexity int) int
		ID           func(childComplexity int) int
		Name         func(childComplexity int) int
		Receiver     func(childComplexity int) int
		ReceiverType func(childComplexity int) int
		Status       func(childComplexity int) int
		TenantID     func(childComplexity int) int
		UpdatedAt    func(childComplexity int) int
		UpdatedBy    func(childComplexity int) int
	}

	MsgChannelConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	MsgChannelEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	MsgEvent struct {
		Comments         func(childComplexity int) int
		CreatedAt        func(childComplexity int) int
		CreatedBy        func(childComplexity int) int
		CustomerTemplate func(childComplexity int) int
		ID               func(childComplexity int) int
		Modes            func(childComplexity int) int
		MsgType          func(childComplexity int) int
		MsgTypeID        func(childComplexity int) int
		Name             func(childComplexity int) int
		Route            func(childComplexity int) int
		RouteStr         func(childComplexity int, typeArg model.RouteStrType) int
		Status           func(childComplexity int) int
		UpdatedAt        func(childComplexity int) int
		UpdatedBy        func(childComplexity int) int
	}

	MsgEventConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	MsgEventEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	MsgInternal struct {
		Body          func(childComplexity int) int
		Category      func(childComplexity int) int
		CreatedAt     func(childComplexity int) int
		CreatedBy     func(childComplexity int) int
		Format        func(childComplexity int) int
		HasReadCounts func(childComplexity int) int
		ID            func(childComplexity int) int
		MsgInternalTo func(childComplexity int) int
		Redirect      func(childComplexity int) int
		Subject       func(childComplexity int) int
		TenantID      func(childComplexity int) int
		ToSendCounts  func(childComplexity int) int
		UpdatedAt     func(childComplexity int) int
		UpdatedBy     func(childComplexity int) int
	}

	MsgInternalConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	MsgInternalEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	MsgInternalTo struct {
		CreatedAt     func(childComplexity int) int
		DeleteAt      func(childComplexity int) int
		ID            func(childComplexity int) int
		MsgInternal   func(childComplexity int) int
		MsgInternalID func(childComplexity int) int
		ReadAt        func(childComplexity int) int
		TenantID      func(childComplexity int) int
		User          func(childComplexity int) int
		UserID        func(childComplexity int) int
	}

	MsgInternalToConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	MsgInternalToEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	MsgSubscriber struct {
		CreatedAt func(childComplexity int) int
		CreatedBy func(childComplexity int) int
		Exclude   func(childComplexity int) int
		ID        func(childComplexity int) int
		MsgType   func(childComplexity int) int
		MsgTypeID func(childComplexity int) int
		OrgRoleID func(childComplexity int) int
		TenantID  func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		UpdatedBy func(childComplexity int) int
		User      func(childComplexity int) int
		UserID    func(childComplexity int) int
	}

	MsgTemplate struct {
		Attachments  func(childComplexity int) int
		Bcc          func(childComplexity int) int
		Body         func(childComplexity int) int
		Cc           func(childComplexity int) int
		Comments     func(childComplexity int) int
		CreatedAt    func(childComplexity int) int
		CreatedBy    func(childComplexity int) int
		Event        func(childComplexity int) int
		Format       func(childComplexity int) int
		From         func(childComplexity int) int
		ID           func(childComplexity int) int
		MsgEventID   func(childComplexity int) int
		MsgTypeID    func(childComplexity int) int
		Name         func(childComplexity int) int
		ReceiverType func(childComplexity int) int
		Status       func(childComplexity int) int
		Subject      func(childComplexity int) int
		TenantID     func(childComplexity int) int
		To           func(childComplexity int) int
		Tpl          func(childComplexity int) int
		UpdatedAt    func(childComplexity int) int
		UpdatedBy    func(childComplexity int) int
	}

	MsgTemplateConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	MsgTemplateEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	MsgType struct {
		AppID                  func(childComplexity int) int
		CanCustom              func(childComplexity int) int
		CanSubs                func(childComplexity int) int
		Category               func(childComplexity int) int
		Comments               func(childComplexity int) int
		CreatedAt              func(childComplexity int) int
		CreatedBy              func(childComplexity int) int
		Events                 func(childComplexity int) int
		ExcludeSubscriberUsers func(childComplexity int) int
		ID                     func(childComplexity int) int
		Name                   func(childComplexity int) int
		Status                 func(childComplexity int) int
		SubscriberRoles        func(childComplexity int) int
		SubscriberUsers        func(childComplexity int) int
		Subscribers            func(childComplexity int) int
		UpdatedAt              func(childComplexity int) int
		UpdatedBy              func(childComplexity int) int
	}

	MsgTypeConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	MsgTypeEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Mutation struct {
		CreateMsgChannel              func(childComplexity int, input ent.CreateMsgChannelInput) int
		CreateMsgEvent                func(childComplexity int, input ent.CreateMsgEventInput) int
		CreateMsgSubscriber           func(childComplexity int, inputs []*ent.CreateMsgSubscriberInput) int
		CreateMsgTemplate             func(childComplexity int, input ent.CreateMsgTemplateInput) int
		CreateMsgType                 func(childComplexity int, input ent.CreateMsgTypeInput) int
		CreateSilence                 func(childComplexity int, input ent.CreateSilenceInput) int
		DeleteMsgChannel              func(childComplexity int, id int) int
		DeleteMsgEvent                func(childComplexity int, id int) int
		DeleteMsgSubscriber           func(childComplexity int, ids []int) int
		DeleteMsgTemplate             func(childComplexity int, id int) int
		DeleteMsgType                 func(childComplexity int, id int) int
		DeleteSilence                 func(childComplexity int, id int) int
		DisableMsgChannel             func(childComplexity int, id int) int
		DisableMsgEvent               func(childComplexity int, id int) int
		DisableMsgTemplate            func(childComplexity int, id int) int
		EnableMsgChannel              func(childComplexity int, id int) int
		EnableMsgEvent                func(childComplexity int, id int) int
		EnableMsgTemplate             func(childComplexity int, id int) int
		MarkMsgInternalToDeleted      func(childComplexity int, ids []int) int
		MarkMsgInternalToReadOrUnRead func(childComplexity int, ids []int, read bool) int
		TestSendEmailTpl              func(childComplexity int, tplID int, email string, labels map[string]string, annotations map[string]string) int
		TestSendMessageTpl            func(childComplexity int, tplID int, userID int, labels map[string]string, annotations map[string]string) int
		UpdateMsgChannel              func(childComplexity int, id int, input ent.UpdateMsgChannelInput) int
		UpdateMsgEvent                func(childComplexity int, id int, input ent.UpdateMsgEventInput) int
		UpdateMsgTemplate             func(childComplexity int, id int, input ent.UpdateMsgTemplateInput) int
		UpdateMsgType                 func(childComplexity int, id int, input ent.UpdateMsgTypeInput) int
		UpdateSilence                 func(childComplexity int, id int, input ent.UpdateSilenceInput) int
	}

	Nlog struct {
		Alerts       func(childComplexity int) int
		CreatedAt    func(childComplexity int) int
		ExpiresAt    func(childComplexity int) int
		GroupKey     func(childComplexity int) int
		ID           func(childComplexity int) int
		Idx          func(childComplexity int) int
		NlogAlert    func(childComplexity int) int
		Receiver     func(childComplexity int) int
		ReceiverType func(childComplexity int) int
		SendAt       func(childComplexity int) int
		TenantID     func(childComplexity int) int
		UpdatedAt    func(childComplexity int) int
	}

	NlogAlert struct {
		Alert     func(childComplexity int) int
		AlertID   func(childComplexity int) int
		CreatedAt func(childComplexity int) int
		ID        func(childComplexity int) int
		Nlog      func(childComplexity int) int
		NlogID    func(childComplexity int) int
	}

	NlogConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	NlogEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	PageInfo struct {
		EndCursor       func(childComplexity int) int
		HasNextPage     func(childComplexity int) int
		HasPreviousPage func(childComplexity int) int
		StartCursor     func(childComplexity int) int
	}

	Query struct {
		MsgAlerts                             func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgAlertOrder, where *ent.MsgAlertWhereInput) int
		MsgChannels                           func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgChannelOrder, where *ent.MsgChannelWhereInput) int
		MsgEvents                             func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgEventOrder, where *ent.MsgEventWhereInput) int
		MsgInternalTos                        func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgInternalToOrder, where *ent.MsgInternalToWhereInput) int
		MsgInternals                          func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgInternalOrder, where *ent.MsgInternalWhereInput) int
		MsgTemplates                          func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgTemplateOrder, where *ent.MsgTemplateWhereInput) int
		MsgTypeCategories                     func(childComplexity int, keyword *string, appID *int) int
		MsgTypes                              func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgTypeOrder, where *ent.MsgTypeWhereInput) int
		Node                                  func(childComplexity int, id string) int
		Nodes                                 func(childComplexity int, ids []string) int
		Silences                              func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.SilenceOrder, where *ent.SilenceWhereInput) int
		UserMsgInternalTos                    func(childComplexity int, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgInternalToOrder, where *ent.MsgInternalToWhereInput) int
		UserSubMsgCategory                    func(childComplexity int) int
		UserUnreadMsgInternals                func(childComplexity int) int
		UserUnreadMsgInternalsFromMsgCategory func(childComplexity int, categories []string) int
	}

	Receiver struct {
		EmailConfigs  func(childComplexity int) int
		MessageConfig func(childComplexity int) int
		Name          func(childComplexity int) int
	}

	Route struct {
		ActiveTimeIntervals func(childComplexity int) int
		Continue            func(childComplexity int) int
		GroupBy             func(childComplexity int) int
		GroupInterval       func(childComplexity int) int
		GroupWait           func(childComplexity int) int
		Matchers            func(childComplexity int) int
		MuteTimeIntervals   func(childComplexity int) int
		Receiver            func(childComplexity int) int
		RepeatInterval      func(childComplexity int) int
		Routes              func(childComplexity int) int
	}

	Silence struct {
		Comments  func(childComplexity int) int
		CreatedAt func(childComplexity int) int
		CreatedBy func(childComplexity int) int
		EndsAt    func(childComplexity int) int
		ID        func(childComplexity int) int
		Matchers  func(childComplexity int) int
		StartsAt  func(childComplexity int) int
		State     func(childComplexity int) int
		TenantID  func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		UpdatedBy func(childComplexity int) int
		User      func(childComplexity int) int
	}

	SilenceConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	SilenceEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Subscription struct {
		Message func(childComplexity int) int
	}

	User struct {
		DisplayName   func(childComplexity int) int
		Email         func(childComplexity int) int
		ID            func(childComplexity int) int
		Mobile        func(childComplexity int) int
		PrincipalName func(childComplexity int) int
		Silences      func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MsgAlertResolver

type MsgAlertResolver interface {
	Labels(ctx context.Context, obj *ent.MsgAlert) (map[string]string, error)
	Annotations(ctx context.Context, obj *ent.MsgAlert) (map[string]string, error)

	NlogAlerts(ctx context.Context, obj *ent.MsgAlert) ([]*ent.NlogAlert, error)
}

type MsgEventResolver

type MsgEventResolver interface {
	RouteStr(ctx context.Context, obj *ent.MsgEvent, typeArg model.RouteStrType) (string, error)
}

type MsgInternalResolver

type MsgInternalResolver interface {
	ToSendCounts(ctx context.Context, obj *ent.MsgInternal) (int, error)
	HasReadCounts(ctx context.Context, obj *ent.MsgInternal) (int, error)
}

type MsgTypeResolver

type MsgTypeResolver interface {
	SubscriberUsers(ctx context.Context, obj *ent.MsgType) ([]*ent.MsgSubscriber, error)
	SubscriberRoles(ctx context.Context, obj *ent.MsgType) ([]*ent.MsgSubscriber, error)
	ExcludeSubscriberUsers(ctx context.Context, obj *ent.MsgType) ([]*ent.MsgSubscriber, error)
}

type MutationResolver

type MutationResolver interface {
	CreateMsgType(ctx context.Context, input ent.CreateMsgTypeInput) (*ent.MsgType, error)
	UpdateMsgType(ctx context.Context, id int, input ent.UpdateMsgTypeInput) (*ent.MsgType, error)
	DeleteMsgType(ctx context.Context, id int) (bool, error)
	CreateMsgEvent(ctx context.Context, input ent.CreateMsgEventInput) (*ent.MsgEvent, error)
	UpdateMsgEvent(ctx context.Context, id int, input ent.UpdateMsgEventInput) (*ent.MsgEvent, error)
	DeleteMsgEvent(ctx context.Context, id int) (bool, error)
	EnableMsgEvent(ctx context.Context, id int) (*ent.MsgEvent, error)
	DisableMsgEvent(ctx context.Context, id int) (*ent.MsgEvent, error)
	CreateMsgChannel(ctx context.Context, input ent.CreateMsgChannelInput) (*ent.MsgChannel, error)
	UpdateMsgChannel(ctx context.Context, id int, input ent.UpdateMsgChannelInput) (*ent.MsgChannel, error)
	DeleteMsgChannel(ctx context.Context, id int) (bool, error)
	EnableMsgChannel(ctx context.Context, id int) (*ent.MsgChannel, error)
	DisableMsgChannel(ctx context.Context, id int) (*ent.MsgChannel, error)
	CreateMsgTemplate(ctx context.Context, input ent.CreateMsgTemplateInput) (*ent.MsgTemplate, error)
	UpdateMsgTemplate(ctx context.Context, id int, input ent.UpdateMsgTemplateInput) (*ent.MsgTemplate, error)
	DeleteMsgTemplate(ctx context.Context, id int) (bool, error)
	EnableMsgTemplate(ctx context.Context, id int) (*ent.MsgTemplate, error)
	DisableMsgTemplate(ctx context.Context, id int) (*ent.MsgTemplate, error)
	CreateMsgSubscriber(ctx context.Context, inputs []*ent.CreateMsgSubscriberInput) ([]*ent.MsgSubscriber, error)
	DeleteMsgSubscriber(ctx context.Context, ids []int) (bool, error)
	CreateSilence(ctx context.Context, input ent.CreateSilenceInput) (*ent.Silence, error)
	UpdateSilence(ctx context.Context, id int, input ent.UpdateSilenceInput) (*ent.Silence, error)
	DeleteSilence(ctx context.Context, id int) (bool, error)
	MarkMsgInternalToReadOrUnRead(ctx context.Context, ids []int, read bool) (bool, error)
	MarkMsgInternalToDeleted(ctx context.Context, ids []int) (bool, error)
	TestSendEmailTpl(ctx context.Context, tplID int, email string, labels map[string]string, annotations map[string]string) (bool, error)
	TestSendMessageTpl(ctx context.Context, tplID int, userID int, labels map[string]string, annotations map[string]string) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	Node(ctx context.Context, id string) (ent.Noder, error)
	Nodes(ctx context.Context, ids []string) ([]ent.Noder, error)
	MsgInternals(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgInternalOrder, where *ent.MsgInternalWhereInput) (*ent.MsgInternalConnection, error)
	MsgInternalTos(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgInternalToOrder, where *ent.MsgInternalToWhereInput) (*ent.MsgInternalToConnection, error)
	MsgChannels(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgChannelOrder, where *ent.MsgChannelWhereInput) (*ent.MsgChannelConnection, error)
	MsgTypes(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgTypeOrder, where *ent.MsgTypeWhereInput) (*ent.MsgTypeConnection, error)
	MsgTypeCategories(ctx context.Context, keyword *string, appID *int) ([]string, error)
	MsgEvents(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgEventOrder, where *ent.MsgEventWhereInput) (*ent.MsgEventConnection, error)
	MsgTemplates(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgTemplateOrder, where *ent.MsgTemplateWhereInput) (*ent.MsgTemplateConnection, error)
	Silences(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.SilenceOrder, where *ent.SilenceWhereInput) (*ent.SilenceConnection, error)
	MsgAlerts(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgAlertOrder, where *ent.MsgAlertWhereInput) (*ent.MsgAlertConnection, error)
	UserMsgInternalTos(ctx context.Context, after *entgql.Cursor[int], first *int, before *entgql.Cursor[int], last *int, orderBy *ent.MsgInternalToOrder, where *ent.MsgInternalToWhereInput) (*ent.MsgInternalToConnection, error)
	UserSubMsgCategory(ctx context.Context) ([]string, error)
	UserUnreadMsgInternalsFromMsgCategory(ctx context.Context, categories []string) ([]int, error)
	UserUnreadMsgInternals(ctx context.Context) (int, error)
}

type ResolverRoot

type ResolverRoot interface {
	MsgAlert() MsgAlertResolver
	MsgEvent() MsgEventResolver
	MsgInternal() MsgInternalResolver
	MsgType() MsgTypeResolver
	Mutation() MutationResolver
	Query() QueryResolver
	Route() RouteResolver
	Subscription() SubscriptionResolver
	RouteInput() RouteInputResolver
}

type RouteInputResolver

type RouteInputResolver interface {
	Matchers(ctx context.Context, obj *profile.Route, data []*label.Matcher) error
}

type RouteResolver

type RouteResolver interface {
	Matchers(ctx context.Context, obj *profile.Route) ([]*label.Matcher, error)
}

type SubscriptionResolver

type SubscriptionResolver interface {
	Message(ctx context.Context) (<-chan *model.Message, error)
}

Jump to

Keyboard shortcuts

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