database

package
v0.0.0-...-c3ab6b1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package database provides an interface for creating and using databases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmazonRDS

type AmazonRDS struct {
	URL string
	// contains filtered or unexported fields
}

AmazonRDS is a struct that represents a database that uses Amazon RDS.

func NewAmazonRDS

func NewAmazonRDS(newURL string, newUsername string, newPassword string) *AmazonRDS

NewAmazonRDS is a function that returns a pointer to a new AmazonRDS struct.

func (AmazonRDS) GetData

func (rds AmazonRDS) GetData(dataID string) string

GetData will get the Data associated with the provided ID and return it from the database.

func (AmazonRDS) GetPassword

func (rds AmazonRDS) GetPassword() string

GetPassword will get the password used when connecting to the database.

func (AmazonRDS) GetURL

func (rds AmazonRDS) GetURL() string

GetURL returns the IP of the database struct.

func (AmazonRDS) GetUsername

func (rds AmazonRDS) GetUsername() string

GetUsername will return the username currently being used to connect to the database.

func (AmazonRDS) PutData

func (rds AmazonRDS) PutData(newData string) string

PutData will put Data into the database and return the data's ID.

func (*AmazonRDS) SetPassword

func (rds *AmazonRDS) SetPassword(newPass string)

SetPassword will set the password used when connecting to the database.

func (*AmazonRDS) SetURL

func (rds *AmazonRDS) SetURL(newURL string)

SetURL sets the IP of the database struct.

func (*AmazonRDS) SetUsername

func (rds *AmazonRDS) SetUsername(newUsername string)

SetUsername will set the username used when connecting to the database.

type Database

type Database interface {
	PutData(string) string // Save data to Database and return it's ID
	GetData(string) string // Get data associated with the ID from the Database
	SetURL(string)         // Set the URL of the Database struct
	GetURL() string        // Get the URL of the Database struct
	SetUsername(string)    // Set the username to use when connecting to the Database
	GetUsername() string   // Get the username used by the Database struct
	SetPassword(string)    // Set the password to use when connecting to the Database
	GetPassword() string   // Get the password used by the Database struct
}

Database is an interface that defines the methods within a database struct

Jump to

Keyboard shortcuts

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