handlers

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerHandler

type ServerHandler struct {
	Logger            *log.Logger
	URLPath           string // Used in HTML output and to build the URL for the next resource.
	HTMLEnabled       bool   // Is HTML output enabled for this service
	HTMLTemplate      string // The full file path (prefix + HTML template directory + template filename)
	CollectionID      string // The collection ID that is being used
	ServerRecordLimit int    // The maximum number of records that the server will respond with.
	Authenticated     bool   // Is this handler to be authenticated
	BasicAuth         bool   // Is Basic Auth used
	DS                datastore.Datastorer
	Resource          interface{} // This holds the actual resource and is populated in the main freetaxii.go
}

ServerHandler - This type will hold the data elements required to process all TAXII requests.

func New

func New(logger *log.Logger) (ServerHandler, error)

func NewAPIRootHandler

func NewAPIRootHandler(logger *log.Logger, api config.APIRootService, r apiroot.APIRoot) (ServerHandler, error)

NewAPIRootHandler - This function will prepare the data for the API Root handler.

func NewCollectionHandler

func NewCollectionHandler(logger *log.Logger, api config.APIRootService, r collections.Collection, limit int) (ServerHandler, error)

NewCollectionHandler - This function will prepare the data for the Collection handler.

func NewCollectionsHandler

func NewCollectionsHandler(logger *log.Logger, api config.APIRootService, r collections.Collections, limit int) (ServerHandler, error)

NewCollectionsHandler - This function will prepare the data for the Collections handler.

func NewDiscoveryHandler

func NewDiscoveryHandler(logger *log.Logger, c config.DiscoveryService, r discovery.Discovery) (ServerHandler, error)

NewDiscoveryHandler - This function will prepare the data for the Discovery handler.

func NewManifestHandler

func NewManifestHandler(logger *log.Logger, api config.APIRootService, collectionID string, limit int) (ServerHandler, error)

NewManifestHandler - This function will prepare the data for the Manifest handler.

func NewObjectVersionsHandler

func NewObjectVersionsHandler(logger *log.Logger, api config.APIRootService, collectionID string, limit int) (ServerHandler, error)

NewObjectVersionsHandler - This function will prepare the data for the Objects by ID handler.

func NewObjectsByIDHandler

func NewObjectsByIDHandler(logger *log.Logger, api config.APIRootService, collectionID string, limit int) (ServerHandler, error)

NewObjectsByIDHandler - This function will prepare the data for the Objects by ID handler.

func NewObjectsHandler

func NewObjectsHandler(logger *log.Logger, api config.APIRootService, collectionID string, limit int) (ServerHandler, error)

NewObjectsHandler - This function will prepare the data for the Objects handler.

func (*ServerHandler) APIRootHandler

func (s *ServerHandler) APIRootHandler(w http.ResponseWriter, r *http.Request)

APIRootHandler - This method will handle all API Root requests

func (*ServerHandler) CollectionHandler

func (s *ServerHandler) CollectionHandler(w http.ResponseWriter, r *http.Request)

CollectionHandler - This method will handle all Collection requests

func (*ServerHandler) CollectionsHandler

func (s *ServerHandler) CollectionsHandler(w http.ResponseWriter, r *http.Request)

CollectionsHandler - This method will handle all Collections requests

func (*ServerHandler) DiscoveryHandler

func (s *ServerHandler) DiscoveryHandler(w http.ResponseWriter, r *http.Request)

DiscoveryHandler - This method will handle all Discovery requests

func (*ServerHandler) ObjectsServerWriteHandler

func (s *ServerHandler) ObjectsServerWriteHandler(w http.ResponseWriter, r *http.Request)

ObjectsServerWriteHandler - This method will handle all POST requests of STIX objects from the TAXII server.

func (*ServerHandler) STIXContentServerHandler

func (s *ServerHandler) STIXContentServerHandler(w http.ResponseWriter, r *http.Request)

STIXContentServerHandler - This method will handle all of the requests for STIX objects from the TAXII server.

Jump to

Keyboard shortcuts

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