Versions in this module Expand all Collapse all v0 v0.0.1 Oct 21, 2019 Changes in this version + func ParseDuration(str string) (time.Duration, error) + type AuthType uint + const AnyAuth + const EAPMSCHAPv2Auth + const NoAuth + const PreSharedKeyAuth + const PublicKeyAuth + const UnknownAuth + func ParseAuthType(str string) AuthType + func (a AuthType) String() string + type BitNum uint64 + const BitMultiplier + const GBit + const KBit + const MBit + const TBit + func (bn BitNum) ByteNum() ByteNum + func (bn BitNum) String() string + type ByteNum uint64 + const ByteMultiplier + const GiByte + const KiByte + const MiByte + const TiByte + func (bn ByteNum) BitNum() BitNum + func (bn ByteNum) String() string + type CRL struct + AuthKeyID string + Issuer *Cert + Revokations []*Revokation + Serial uint64 + UpdateNext time.Time + UpdateThis time.Time + type Callback func(...interface{}) + type Cert struct + CRL *CRL + Cert *x509.Certificate + Issued []*Cert + Issuer *Cert + type CertsGetter struct + func NewCertsGetter() (*CertsGetter, error) + func (cg *CertsGetter) GetCerts() ([]*Cert, error) + type CertsReader interface + Read func(io.Reader) ([]*Cert, error) + type Child struct + Local []string + Mode ConnectionMode + Reauth time.Duration + Rekeying time.Duration + Remote []string + func (c Child) String() string + type ChildSA struct + BytesIn ByteNum + BytesOut ByteNum + InputSPI string + Installed bool + IsLocalInitiator bool + LastInAgo string + LastOutAgo string + LocalNet string + Mode ConnectionMode + OutputSPI string + PktsIn uint64 + PktsOut uint64 + Proto IPsecProto + RemoteNet string + ReqID int64 + Security string + UDPEncaps bool + UntilRekey string + type Connection struct + Children []Child + LocalAddr []string + LocalAuth []AuthType + LocalID []string + Name string + RemoteAddr []string + RemoteAuth []AuthType + RemoteID []string + SAs []*SA + Version IKEVersion + type ConnectionMode uint + const PassMode + const TransportMode + const TunnelMode + const UnknownMode + func ParseConnectionMode(str string) ConnectionMode + func (cm ConnectionMode) String() string + type ConnectionsGetter struct + func NewConnectionsGetter() (*ConnectionsGetter, error) + func (cg *ConnectionsGetter) GetConns() ([]*Connection, error) + type ConnectionsReader interface + Read func(io.Reader) ([]*Connection, error) + type IKESA struct + Alive string + Auth AuthType + Deleting bool + Established bool + InitiatorSPI string + IsInitiator bool + LocalAddr string + LocalID string + RemoteAddr string + RemoteID string + ResponderSPI string + Security string + UntilReauth string + Version IKEVersion + type IKEVersion uint + const IKEUnknown + const IKEv1 + const IKEv2 + func ParseIKEVersion(str string) IKEVersion + func (i IKEVersion) String() string + type IPsecProto uint + const AHProto + const ESPProto + const UnknownProto + func ParseIPsecProto(str string) IPsecProto + func (p IPsecProto) String() string + type Info struct + Certs []*Cert + CertsRoutine *PeriodicObservableRoutine + Connections []*Connection + ConnsRoutine *PeriodicObservableRoutine + Pools []Pool + PoolsRoutine *PeriodicObservableRoutine + Since time.Time + Uptime time.Duration + UptimeRoutine *PeriodicObservableRoutine + func NewInfo(uptimePeriod, poolsPeriod, connectionsPeriod, certsPeriod time.Duration) (*Info, error) + func (info *Info) Start() + func (info *Info) Stop() + type IpsecCertsReader struct + func (icr *IpsecCertsReader) Read(r io.Reader) ([]*Cert, error) + type IpsecConnReader struct + func (icr *IpsecConnReader) Read(r io.Reader) ([]*Connection, error) + type IpsecPoolsReader struct + func (ipr *IpsecPoolsReader) Read(r io.Reader) ([]Pool, error) + type IpsecSummaryReader struct + func (s *IpsecSummaryReader) Read(r io.Reader) (time.Duration, time.Time, error) + type Observable interface + Notify func(int) + RegObserver func() chan int + UnregObserver func(chan int) + type PeriodicObservableRoutine struct + func NewPeriodicObservableRoutine(period time.Duration, routine func(*PeriodicObservableRoutine)) *PeriodicObservableRoutine + func (por *PeriodicObservableRoutine) Go() + func (por *PeriodicObservableRoutine) Notify(val int) + func (por *PeriodicObservableRoutine) RegObserver() chan int + func (por *PeriodicObservableRoutine) UnregObserver(ch chan int) + type Pool struct + Addr string + Name string + Off int + On int + Size int + func (p Pool) String() string + type PoolsGetter struct + func NewPoolsGetter() (*PoolsGetter, error) + func (pg *PoolsGetter) GetPools() ([]Pool, error) + type PoolsReader interface + Read func(io.Reader) ([]Pool, error) + type Revokation struct + Reaseon RevokationReason + Serial uint64 + Time time.Time + type RevokationReason int + const CACompromisedReason + const KeyCompromisedReason + const UnknownReason + type SA struct + ChildSAs []ChildSA + IKESA IKESA + type Summary struct + SAHalfOpened int + SATotal int + Since time.Time + TotalBytesIn int64 + TotalBytesOut int64 + TotalPktsIn int64 + TotalPktsOut int64 + Uptime string + func (s *Summary) String() string + type SwanctlSummaryReader struct + func (s *SwanctlSummaryReader) Read(r io.Reader) (string, time.Time, error) + type UptimeGetter struct + func NewUptimeGetter() (*UptimeGetter, error) + func (ug *UptimeGetter) GetUptime() (time.Duration, time.Time, error) + type UptimeReader interface + Read func(io.Reader) (time.Duration, time.Time, error) + type ViciCertsReader struct + func NewViciCertsReader() (*ViciCertsReader, error) + func (vcr *ViciCertsReader) Read(io.Reader) ([]*Cert, error) + type ViciConnReader struct + func NewViciConnReader() (*ViciConnReader, error) + func (vcr *ViciConnReader) Read(io.Reader) ([]*Connection, error) + type ViciOptions struct + IKE string