Documentation
¶
Index ¶
- Variables
- type AuthMethod
- type Config
- type GenericResponse
- type GenericResponseEntry
- type MsgEntry
- type MsgResponse
- type NetflowEntry
- type NetflowResponse
- type NetflowTimeSeries
- type NetflowTimeSeriesResponse
- type PasswordAuth
- type ResponseParser
- type TestResponse
- type TimeSeriesResponse
- type TimeSeriesResponseEntry
- type Transport
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFields = errors.New("akips: incorrect number of fields")
)
Functions ¶
This section is empty.
Types ¶
type AuthMethod ¶
AuthMethod represents an authentication method
type Config ¶
type Config struct {
AuthMethod AuthMethod
URL string
Transport http.RoundTripper
}
Config is the client configuration
type GenericResponse ¶
type GenericResponse []*GenericResponseEntry
GenericResponse consists of a parent, a child, an attribute and a list of values
func (*GenericResponse) ParseResponse ¶
func (p *GenericResponse) ParseResponse(rd io.Reader) error
type GenericResponseEntry ¶
type MsgResponse ¶
type MsgResponse []*MsgEntry
func (*MsgResponse) ParseResponse ¶
func (m *MsgResponse) ParseResponse(rd io.Reader) error
type NetflowEntry ¶
type NetflowEntry struct {
Source string `json:"src,omitempty"`
Destination string `json:"dst,omitempty"`
Protocol string `json:"pro,omitempty"`
Packets *int64 `json:"pkt,omitempty"`
Bytes *int64 `json:"oct,omitempty"`
Flows *int64 `json:"flo,omitempty"`
Conversations *int64 `json:"con,omitempty"`
Filter string `json:"tsf,omitempty"`
URL string `json:"url,omitempty"`
}
type NetflowResponse ¶
type NetflowResponse []*NetflowEntry
func (*NetflowResponse) Append ¶
func (a *NetflowResponse) Append(b NetflowResponse)
func (*NetflowResponse) ParseResponse ¶
func (f *NetflowResponse) ParseResponse(rd io.Reader) error
type NetflowTimeSeries ¶
type NetflowTimeSeriesResponse ¶
type NetflowTimeSeriesResponse map[string]*NetflowTimeSeries
func (*NetflowTimeSeriesResponse) Append ¶
func (a *NetflowTimeSeriesResponse) Append(b NetflowTimeSeriesResponse)
func (*NetflowTimeSeriesResponse) ParseResponse ¶
func (t *NetflowTimeSeriesResponse) ParseResponse(rd io.Reader) error
type PasswordAuth ¶
type PasswordAuth string
PasswordAuth authorizes and authenticates the request with a given password
func (PasswordAuth) AuthenticateRequest ¶
func (p PasswordAuth) AuthenticateRequest(r *http.Request)
AuthenticateRequest add a password to request's URL
type ResponseParser ¶
type TestResponse ¶
type TestResponse struct{}
func (TestResponse) ParseResponse ¶
func (t TestResponse) ParseResponse(rd io.Reader) error
type TimeSeriesResponse ¶
type TimeSeriesResponse struct {
Timestamp []time.Time `json:"ts"`
Entries []*TimeSeriesResponseEntry `json:"entries"`
}
func (*TimeSeriesResponse) ParseResponse ¶
func (t *TimeSeriesResponse) ParseResponse(rd io.Reader) error
type TimeSeriesResponseEntry ¶
type Transport ¶
type Transport struct {
// Method adds credentials to outgoing requests
AuthMethod AuthMethod
// Base is the base RoundTripper used to make HTTP requests.
// If nil, http.DefaultTransport is used.
Base http.RoundTripper
}
Transport is an http.RoundTripper that makes authenticated AKiPS API requests
Click to show internal directories.
Click to hide internal directories.