open-vault/vendor/layeh.com/radius/attribute.go
2017-02-07 16:04:27 -05:00

16 lines
464 B
Go

package radius // import "layeh.com/radius"
// Attribute is a RADIUS attribute, which is part of a RADIUS packet.
type Attribute struct {
Type byte
Value interface{}
}
// AttributeCodec defines how an Attribute is encoded and decoded to and from
// wire data.
type AttributeCodec interface {
// Note: do not store wire; make a copy of it.
Decode(packet *Packet, wire []byte) (interface{}, error)
Encode(packet *Packet, value interface{}) ([]byte, error)
}