data

package
Version: v0.0.0-...-b472bfd Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package data contains the schema and models for data access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(query string) string

Log removes line feeds and tabs for better logging.

func NewGraphQL

func NewGraphQL(gqlConfig GraphQLConfig) *graphql.GraphQL

NewGraphQL constructs a graphql value for use to access the databse.

func Validate

func Validate(ctx context.Context, url string, retryInterval time.Duration) error

Validate checks if the DB is ready to receive requests. It will attempt a check between each retry interval specified. The context holds the total amount of time Readiness will wait to validate the DB is healthy.

Types

type GraphQLConfig

type GraphQLConfig struct {
	URL             string
	AuthHeaderName  string
	AuthToken       string
	CloudHeaderName string
	CloudToken      string
}

GraphQLConfig represents comfiguration needed to support managing, mutating, and querying the database.

Source Files

Directories

Path Synopsis
Package advisory provides support for managing advisory data in the database.
Package advisory provides support for managing advisory data in the database.
Package city provides support for managing city data in the database.
Package city provides support for managing city data in the database.
Package place provides support for managing place data in the database.
Package place provides support for managing place data in the database.
Package schema provides schema support for the database.
Package schema provides schema support for the database.
Package tests contains supporting code for running tests.
Package tests contains supporting code for running tests.
Package user provides support for managing users in the database.
Package user provides support for managing users in the database.
Package weather provides support for managing weather data in the database.
Package weather provides support for managing weather data in the database.

Jump to

Keyboard shortcuts

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