reader

package
v0.0.0-...-591da48 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

This package is responsible for serving the GraphQL reader API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(
	e *echo.Echo,
	convenienceService *services.ConvenienceService,
	adapter Adapter,
)

Register the GraphQL reader API to echo.

Types

type Adapter

type Adapter interface {
	GetReport(
		ctx context.Context,
		reportIndex int,
	) (*graphql.Report, error)

	GetReports(
		ctx context.Context,
		first *int, last *int, after *string, before *string, inputIndex *int,
	) (*graphql.ReportConnection, error)

	GetAllReportsByInputIndex(
		ctx context.Context,
		inputIndex *int,
	) (*graphql.ReportConnection, error)

	GetInputs(
		ctx context.Context,
		first *int, last *int, after *string, before *string, where *graphql.InputFilter,
	) (*graphql.InputConnection, error)

	GetInput(
		ctx context.Context,
		id string,
	) (*graphql.Input, error)
	GetInputByIndex(
		ctx context.Context,
		inputIndex int,
	) (*graphql.Input, error)

	GetNotice(
		ctx context.Context,
		outputIndex int,
	) (*graphql.Notice, error)

	GetNotices(
		ctx context.Context,
		first *int, last *int, after *string, before *string, inputIndex *int,
	) (*graphql.NoticeConnection, error)

	GetVoucher(
		ctx context.Context,
		outputIndex int) (*graphql.Voucher, error)

	GetDelegateCallVoucher(
		ctx context.Context,
		outputIndex int) (*graphql.DelegateCallVoucher, error)

	GetVouchers(
		ctx context.Context,
		first *int, last *int, after *string, before *string, inputIndex *int,
		filter []*graphql.ConvenientFilter,
	) (*graphql.VoucherConnection, error)

	GetDelegateCallVouchers(
		ctx context.Context,
		first *int, last *int, after *string, before *string, inputIndex *int,
		filter []*graphql.ConvenientFilter,
	) (*graphql.DelegateCallVoucherConnection, error)

	GetAllVouchersByInputIndex(
		ctx context.Context,
		inputIndex *int,
	) (*graphql.VoucherConnection, error)

	GetAllDelegateCallVouchersByInputIndex(
		ctx context.Context,
		inputIndex *int,
	) (*graphql.DelegateCallVoucherConnection, error)

	GetAllNoticesByInputIndex(
		ctx context.Context,
		inputIndex *int,
	) (*graphql.Connection[*graphql.Notice], error)
}

func NewAdapterV1

func NewAdapterV1(
	db *sqlx.DB,
	convenienceService *services.ConvenienceService,
) Adapter

type AdapterV1

type AdapterV1 struct {
	// contains filtered or unexported fields
}

func (AdapterV1) GetAllDelegateCallVouchersByInputIndex

func (a AdapterV1) GetAllDelegateCallVouchersByInputIndex(ctx context.Context, inputIndex *int) (*graphql.DelegateCallVoucherConnection, error)

GetAllDelegateCallVouchersByInputIndex implements Adapter.

func (AdapterV1) GetAllNoticesByInputIndex

func (a AdapterV1) GetAllNoticesByInputIndex(ctx context.Context, inputIndex *int) (*graphql.Connection[*graphql.Notice], error)

func (AdapterV1) GetAllReportsByInputIndex

func (a AdapterV1) GetAllReportsByInputIndex(ctx context.Context, inputIndex *int) (*graphql.Connection[*graphql.Report], error)

func (AdapterV1) GetAllVouchersByInputIndex

func (a AdapterV1) GetAllVouchersByInputIndex(ctx context.Context, inputIndex *int) (*graphql.Connection[*graphql.Voucher], error)

func (AdapterV1) GetDelegateCallVoucher

func (a AdapterV1) GetDelegateCallVoucher(ctx context.Context, outputIndex int) (*graphql.DelegateCallVoucher, error)

GetDelegateCallVoucher implements Adapter.

func (AdapterV1) GetDelegateCallVouchers

func (a AdapterV1) GetDelegateCallVouchers(ctx context.Context, first *int, last *int, after *string, before *string, inputIndex *int, filter []*graphql.ConvenientFilter) (*graphql.DelegateCallVoucherConnection, error)

GetDelegateCallVouchers implements Adapter.

func (AdapterV1) GetInput

func (a AdapterV1) GetInput(
	ctx context.Context,
	id string) (*graphql.Input, error)

func (AdapterV1) GetInputByIndex

func (a AdapterV1) GetInputByIndex(
	ctx context.Context,
	inputIndex int,
) (*graphql.Input, error)

GetInputByIndex implements Adapter.

func (AdapterV1) GetInputs

func (a AdapterV1) GetInputs(
	ctx context.Context,
	first *int, last *int, after *string, before *string, where *graphql.InputFilter,
) (*graphql.InputConnection, error)

func (AdapterV1) GetNotice

func (a AdapterV1) GetNotice(ctx context.Context, outputIndex int) (*graphql.Notice, error)

func (AdapterV1) GetNotices

func (a AdapterV1) GetNotices(
	ctx context.Context,
	first *int,
	last *int,
	after *string,
	before *string,
	inputIndex *int,
) (*graphql.Connection[*graphql.Notice], error)

func (AdapterV1) GetReport

func (a AdapterV1) GetReport(
	ctx context.Context,
	reportIndex int,
) (*graphql.Report, error)

func (AdapterV1) GetReports

func (a AdapterV1) GetReports(
	ctx context.Context,
	first *int, last *int, after *string, before *string, inputIndex *int,
) (*graphql.ReportConnection, error)

func (AdapterV1) GetVoucher

func (a AdapterV1) GetVoucher(ctx context.Context, outputIndex int) (*graphql.Voucher, error)

func (AdapterV1) GetVouchers

func (a AdapterV1) GetVouchers(
	ctx context.Context,
	first *int,
	last *int,
	after *string,
	before *string,
	inputIndex *int,
	filter []*graphql.ConvenientFilter,
) (*graphql.Connection[*graphql.Voucher], error)

type InputBlobAdapter

type InputBlobAdapter struct{}

func (*InputBlobAdapter) Adapt

func (i *InputBlobAdapter) Adapt(node struct {
	Index  int    `json:"index"`
	Blob   string `json:"blob"`
	Status string `json:"status"`
}) (*graphql.Input, error)

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func (*Resolver) DelegateCallVoucher

func (r *Resolver) DelegateCallVoucher() graph.DelegateCallVoucherResolver

DelegateCallVoucher returns graph.DelegateCallVoucherResolver implementation.

func (*Resolver) Input

func (r *Resolver) Input() graph.InputResolver

Input returns graph.InputResolver implementation.

func (*Resolver) Notice

func (r *Resolver) Notice() graph.NoticeResolver

Notice returns graph.NoticeResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() graph.QueryResolver

Query returns graph.QueryResolver implementation.

func (*Resolver) Report

func (r *Resolver) Report() graph.ReportResolver

Report returns graph.ReportResolver implementation.

func (*Resolver) Voucher

func (r *Resolver) Voucher() graph.VoucherResolver

Voucher returns graph.VoucherResolver implementation.

Directories

Path Synopsis
This module is a wrapper for the nonodo model that converts the internal types to GraphQL-compatible types.
This module is a wrapper for the nonodo model that converts the internal types to GraphQL-compatible types.

Jump to

Keyboard shortcuts

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