Documentation ¶
Index ¶
- Constants
- func CheckForErrors(doc *etree.Document, rootClass string) error
- func CreateHierarchy(rootClass, subClass, confDn string, moEle *etree.Element) *etree.Document
- func StrtoInt(s string, base int, bitSize int) (int64, error)
- type Auth
- type Client
- func (c *Client) Authenticate() error
- func (c *Client) Delete(obj models.Model) (*etree.Document, error)
- func (c *Client) DeleteByDn(dn, klass string) error
- func (c *Client) Do(req *http.Request) (*etree.Document, *http.Response, error)
- func (c *Client) Get(dn string) (*etree.Document, error)
- func (client *Client) InjectAuthenticationHeader(body *etree.Document) (*etree.Document, error)
- func (c *Client) MakeRestRequest(method string, body *etree.Document, authenticated bool) (*http.Request, error)
- func (c *Client) PrepareModel(obj models.Model, rootClass, subClass, confDn, status string) (*etree.Document, string, error)
- func (c *Client) Save(obj models.Model) error
- type Option
Constants ¶
View Source
const DefaultPath = "/nuova"
Default Path to send REST requests.
View Source
const LoginPayLoad = `
<aaaLogin
inName="%s"
inPassword="%s" />
`
View Source
const RefreshPayLoad = `
<aaaRefresh
inName="%s"
inPassword="%s"
inCookie="%s"/>
`
Variables ¶
This section is empty.
Functions ¶
func CreateHierarchy ¶
Types ¶
type Auth ¶
type Auth struct { Token string RefreshPeriod int64 Expiry time.Time // contains filtered or unexported fields }
func (*Auth) CalculateExpiry ¶
type Client ¶
type Client struct { BaseURL *url.URL UserName string Password string AuthToken *Auth // contains filtered or unexported fields }
func (*Client) Authenticate ¶
func (*Client) DeleteByDn ¶
func (*Client) InjectAuthenticationHeader ¶
func (*Client) MakeRestRequest ¶
func (*Client) PrepareModel ¶
Click to show internal directories.
Click to hide internal directories.