Documentation ¶
Overview ¶
This package is responsible for serving the GraphQL reader API.
Index ¶
- func Register(e *echo.Echo, nonodomodel *nonodomodel.NonodoModel, ...)
- type Adapter
- type AdapterV1
- func (a AdapterV1) GetInput(index int) (*graphql.Input, error)
- func (a AdapterV1) GetInputs(ctx context.Context, first *int, last *int, after *string, before *string, ...) (*graphql.InputConnection, error)
- func (a AdapterV1) GetNotice(noticeIndex int, inputIndex int) (*graphql.Notice, error)
- func (a AdapterV1) GetNotices(first *int, last *int, after *string, before *string, inputIndex *int) (*graphql.Connection[*graphql.Notice], error)
- func (a AdapterV1) GetProof(ctx context.Context, inputIndex int, outputIndex int) (*graphql.Proof, error)
- func (a AdapterV1) GetReport(reportIndex int, inputIndex int) (*graphql.Report, error)
- func (a AdapterV1) GetReports(ctx context.Context, first *int, last *int, after *string, before *string, ...) (*graphql.ReportConnection, error)
- func (a AdapterV1) GetVoucher(voucherIndex int, inputIndex int) (*graphql.Voucher, error)
- func (a AdapterV1) GetVouchers(first *int, last *int, after *string, before *string, inputIndex *int) (*graphql.Connection[*graphql.Voucher], error)
- type AdapterV2
- func (a AdapterV2) GetInput(index int) (*graphql.Input, error)
- func (a AdapterV2) GetInputs(ctx context.Context, first *int, last *int, after *string, before *string, ...) (*graphql.InputConnection, error)
- func (a AdapterV2) GetNotice(noticeIndex int, inputIndex int) (*graphql.Notice, error)
- func (a AdapterV2) GetNotices(first *int, last *int, after *string, before *string, inputIndex *int) (*graphql.NoticeConnection, error)
- func (a AdapterV2) GetProof(ctx context.Context, inputIndex int, outputIndex int) (*graphql.Proof, error)
- func (a AdapterV2) GetReport(reportIndex int, inputIndex int) (*graphql.Report, error)
- func (a AdapterV2) GetReports(ctx context.Context, first *int, last *int, after *string, before *string, ...) (*graphql.ReportConnection, error)
- func (a AdapterV2) GetVoucher(voucherIndex int, inputIndex int) (*graphql.Voucher, error)
- func (a AdapterV2) GetVouchers(first *int, last *int, after *string, before *string, inputIndex *int) (*graphql.VoucherConnection, error)
- type InputBlobAdapter
- type InputByIdResponse
- type ProofByIndexes
- type ReportByIdResponse
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register( e *echo.Echo, nonodomodel *nonodomodel.NonodoModel, convenienceService *services.ConvenienceService, adapter Adapter, )
Register the GraphQL reader API to echo.
Types ¶
type Adapter ¶
type Adapter interface { GetReport(reportIndex int, inputIndex int) (*graphql.Report, error) GetReports( ctx context.Context, first *int, last *int, after *string, before *string, inputIndex *int, ) (*graphql.ReportConnection, error) GetInputs( ctx context.Context, first *int, last *int, after *string, before *string, where *graphql.InputFilter, ) (*graphql.InputConnection, error) GetInput(index int) (*graphql.Input, error) GetNotice(noticeIndex int, inputIndex int) (*graphql.Notice, error) GetNotices( first *int, last *int, after *string, before *string, inputIndex *int, ) (*graphql.NoticeConnection, error) GetVoucher(voucherIndex int, inputIndex int) (*graphql.Voucher, error) GetVouchers( first *int, last *int, after *string, before *string, inputIndex *int, ) (*graphql.VoucherConnection, error) GetProof(ctx context.Context, inputIndex, outputIndex int) (*graphql.Proof, error) }
func NewAdapterV1 ¶
func NewAdapterV1( db *sqlx.DB, convenienceService *services.ConvenienceService, ) Adapter
func NewAdapterV2 ¶ added in v1.0.1
func NewAdapterV2( convenienceService *services.ConvenienceService, graphileClient graphile.GraphileClient, inputBlobAdapter InputBlobAdapter, ) Adapter
type AdapterV1 ¶
type AdapterV1 struct {
// contains filtered or unexported fields
}
func (AdapterV1) GetNotices ¶
func (AdapterV1) GetProof ¶ added in v1.3.0
func (a AdapterV1) GetProof(ctx context.Context, inputIndex int, outputIndex int) (*graphql.Proof, error)
GetProof implements Adapter.
func (AdapterV1) GetReports ¶
func (AdapterV1) GetVoucher ¶
type AdapterV2 ¶ added in v1.0.1
type AdapterV2 struct { InputBlobAdapter InputBlobAdapter // contains filtered or unexported fields }
func (AdapterV2) GetNotices ¶ added in v1.0.1
func (AdapterV2) GetProof ¶ added in v1.3.0
func (a AdapterV2) GetProof(ctx context.Context, inputIndex int, outputIndex int) (*graphql.Proof, error)
GetProof implements Adapter.
func (AdapterV2) GetReports ¶ added in v1.0.1
func (AdapterV2) GetVoucher ¶ added in v1.0.1
type InputBlobAdapter ¶ added in v1.0.1
type InputBlobAdapter struct{}
type InputByIdResponse ¶ added in v1.0.1
type ProofByIndexes ¶ added in v1.3.0
type ReportByIdResponse ¶ added in v1.0.1
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.