service

package
v0.0.0-...-9e087f2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package service encapsulates the business logic for the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Issuer string `json:"issuer" mapstructure:"issuer"`
	Key    string `json:"key" mapstructure:"key"`
}

Config define the settings available when configuring a service handler instance.

type Handler

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

Handler provides the main service operator.

func New

func New(conf *Config) (*Handler, error)

New service handler instance.

func (*Handler) AdminToken

func (h *Handler) AdminToken(subject string) (string, error)

AdminToken generates the required credentials to access the API as an administrator.

func (*Handler) Schema

func (h *Handler) Schema() gqlgen.ExecutableSchema

Schema required when exposing the service via GraphQL.

func (*Handler) Shutdown

func (h *Handler) Shutdown()

Shutdown the instance and free resources.

type Resolver

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

Resolver provides the application's main entry point. The implementations required are located on "schema.resolvers.go".

func (*Resolver) Mutation

func (r *Resolver) Mutation() server.MutationResolver

Mutation returns server.MutationResolver implementation.

func (*Resolver) Query

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

Query returns server.QueryResolver implementation.

Directories

Path Synopsis
Package model contains types representing the application's data layer.
Package model contains types representing the application's data layer.

Jump to

Keyboard shortcuts

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