apiroot

package
v0.5.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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRoot

type APIRoot struct {
	properties.TitleProperty
	properties.DescriptionProperty
	Versions         []string `json:"versions"`
	MaxContentLength int      `json:"max_content_length"`
}

APIRoot - This type implements the TAXII 2 API Root Resource and defines all of the properties and methods needed to create and work with the TAXII API Root Resource. All of the methods not defined local to this type are inherited from the individual properties.

The following information comes directly from the TAXII 2 specification documents.

This Endpoint provides general information about an API Root, which can be used to help users and clients decide whether and how they want to interact with it. Multiple API Roots MAY be hosted on a single TAXII Server. Often, an API Root represents a single trust group.

The api-root resource contains general information about the API Root, such as a human-readable title and description, the TAXII versions it supports, and the maximum size of the content body it will accept in a PUT or POST (max_content_length).

func New

func New() *APIRoot

New - This function will create a new TAXII API Root object and return it as a pointer.

func (*APIRoot) AddVersion

func (r *APIRoot) AddVersion(s string) error

AddVersion - This method takes in a string value that represents a version of the TAXII api that is supported and adds it to the versions property.

func (*APIRoot) GetMaxContentLength

func (r *APIRoot) GetMaxContentLength() int

GetMaxContentLength - This method returns the max content length as an integer.

func (*APIRoot) SetMaxContentLength

func (r *APIRoot) SetMaxContentLength(i int) error

SetMaxContentLength - This method takes in an integer value representing the max content length that the server can support and updates the max content length property.

Jump to

Keyboard shortcuts

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