api

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: AGPL-3.0 Imports: 36 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/>.

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

This section is empty.

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 DatamoverCreateRequest

type DatamoverCreateRequest struct {
	Name        *string
	Source      *DatamoverLocationInput
	Destination *DatamoverLocationInput
	Tags        Tags
}

DatamoverCreateRequest is data used to create a DataSync mover

type DatamoverLocationEFSInput added in v0.2.0

type DatamoverLocationEFSInput struct {
	EfsFilesystemArn  *string
	SecurityGroupArns []*string
	SubnetArn         *string
	Subdirectory      *string
}

type DatamoverLocationInput

type DatamoverLocationInput struct {
	Type LocationType
	S3   *DatamoverLocationS3Input
	EFS  *DatamoverLocationEFSInput
}

DatamoverLocationInput is an abstraction for the different location type inputs currently only S3 and EFS are supported

type DatamoverLocationOutput

type DatamoverLocationOutput struct {
	Type LocationType
	S3   *datasync.DescribeLocationS3Output  `json:",omitempty"`
	EFS  *datasync.DescribeLocationEfsOutput `json:",omitempty"`
	SMB  *datasync.DescribeLocationSmbOutput `json:",omitempty"`
	NFS  *datasync.DescribeLocationNfsOutput `json:",omitempty"`
}

DatamoverLocationOutput is an abstraction for the different location type outputs

type DatamoverLocationS3Input

type DatamoverLocationS3Input struct {
	S3BucketArn *string
	// S3StorageClass is one of the following:
	// OUTPOSTS, ONEZONE_IA, DEEP_ARCHIVE, GLACIER, INTELLIGENT_TIERING, STANDARD_IA, STANDARD
	S3StorageClass *string
	Subdirectory   *string
}

type DatamoverResponse

DatamoverResponse is the output from DataSync mover operations

type DatamoverRun added in v0.3.0

type DatamoverRun struct {
	BytesTransferred         *int64
	BytesWritten             *int64
	EstimatedBytesToTransfer *int64
	EstimatedFilesToTransfer *int64
	FilesTransferred         *int64
	StartTime                *time.Time
	Status                   *string
	Result                   *datasync.TaskExecutionResultDetail
}

type LocationType

type LocationType string
const (
	S3  LocationType = "S3"
	EFS LocationType = "EFS"
	SMB LocationType = "SMB"
	NFS LocationType = "NFS"
)

func (LocationType) String

func (lt LocationType) String() string

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 MoverUpdateAction added in v0.3.0

type MoverUpdateAction struct {
	State *string
}

type Tag

type Tag struct {
	Key   string
	Value string
}

type Tags

type Tags []Tag

Jump to

Keyboard shortcuts

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