api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Copyright © 2021 Yale University

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var DefaultAvailabilityZones = []*string{
	aws.String("us-east-1a"),
	aws.String("us-east-1d"),
}
View Source
var SubnetIDSlice = []*string{
	aws.String("subnet-0707d40ddbb9d0818"),
	aws.String("subnet-02364e7e9fc4d8045"),
}

Functions

func NewServer

func NewServer(config common.Config) error

NewServer creates a new server and starts it

func TokenMiddleware

func TokenMiddleware(psk []byte, public map[string]string, h http.Handler) http.Handler

TokenMiddleware checks the tokens for non-public URLs

Types

type Cluster

type Cluster struct {
	DBClusters DBCluster
}

Cluster is the DBCluster outer JSON Key

type CreateDocDB

type CreateDocDB struct {
	AvailabilityZones   []string
	InstanceCount       int
	DBClusterIdentifier string
	DBSubnetGroupName   string
	DBInstanceClass     string
	Engine              string
	MasterUsername      string
	MasterUserPassword  string
	MaintenanceWindow   string
	PromotionTier       int64
	StorageEncrypted    bool
	Tags                []*Tag
}

CreateDocDB is data used to create a documentDB

type DBCluster

type DBCluster struct {
	DBClusterArn        string
	DBClusterIdentifier string
	Endpoint            string
	ReaderEndpoint      string
	StorageEncrypted    bool
	DBSubnetGroup       string
	DBInstances         []*DBInstance
}

DBCluster helps us collect useful data from the upstream Cluster create call output

type DBInstance

type DBInstance struct {
	AvailabilityZone      string
	BackupRetentionPeriod int64
	DBInstanceArn         string
	DBInstanceClass       string
	DBInstanceStatus      string
	DBInstanceIdentifier  string
	DBSubnetGroup         *DBSubnetGroup
	Endpoint              *Endpoint
	Engine                string
	EngineVersion         string
	InstanceCreateTime    time.Time
	KmsKeyId              string
	StorageEncrypted      bool
}

DBInstance helps us collect useful data from the upstream instance create call output

type DBSubnetGroup

type DBSubnetGroup struct {
	DBSubnetGroupARN         string
	DBSubnetGroupDescription string
	DBSubnetGroupName        string
	SubnetGroupStatus        string
	Subnets                  []*Subnet
	VpcID                    string
}

DBSubnetGroup lists a DBSubnetGroup configuration

type DeleteDocDB

type DeleteDocDB struct {
	FinalDBSnapshotIdentifier string
	SkipFinalSnapshot         bool
	ClusterName               string
	InstanceNames             []string
}

DeleteDocDB is data used to delete a documentDB

type Endpoint

type Endpoint struct {
	Address      *string `type:"string"`
	HostedZoneId *string `type:"string"`
	Port         *int64  `type:"integer"`
}

type LogWriter

type LogWriter struct {
	http.ResponseWriter
}

LogWriter is an http.ResponseWriter

func (LogWriter) Write

func (w LogWriter) Write(p []byte) (n int, err error)

Write log message if http response writer returns an error

type Subnet

type Subnet struct {
	SubnetAvailabilityZone string
	SubnetIdentifier       string
	SubnetStatus           string
}

Subnet

type Tag

type Tag struct {
	Key   *string
	Value *string
}

Tag provides metadata and billing information

Jump to

Keyboard shortcuts

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