Documentation ¶
Index ¶
- func CheckResponse(r *http.Response) error
- type BasicAuthTransport
- type Client
- type Dataset
- type DatasetService
- func (s *DatasetService) Create(ctx context.Context, parent string, dataset Dataset) (*Dataset, *Response, error)
- func (s *DatasetService) Delete(ctx context.Context, ds string) (*Response, error)
- func (s *DatasetService) Edit(ctx context.Context, parent string, dataset Dataset) (*Dataset, *Response, error)
- func (s *DatasetService) Get(ctx context.Context, parent string) (*Dataset, *Response, error)
- func (s *DatasetService) List(ctx context.Context) ([]*Dataset, *Response, error)
- type ErrorResponse
- type ListOptions
- type NfsShare
- type NfsShareService
- func (s *NfsShareService) Create(ctx context.Context, share NfsShare) (*NfsShare, *Response, error)
- func (s *NfsShareService) Delete(ctx context.Context, number int64) (*Response, error)
- func (s *NfsShareService) Edit(ctx context.Context, number int64, share NfsShare) (*NfsShare, *Response, error)
- func (s *NfsShareService) Get(ctx context.Context, number int64) (*NfsShare, *Response, error)
- func (s *NfsShareService) List(ctx context.Context) ([]*NfsShare, *Response, error)
- type Response
- type User
- type UserService
- func (s *UserService) Create(ctx context.Context, user User) (*User, *Response, error)
- func (s *UserService) Delete(ctx context.Context, number int64) (*Response, error)
- func (s *UserService) Edit(ctx context.Context, number int64, user User) (*User, *Response, error)
- func (s *UserService) Get(ctx context.Context, number int64) (*User, *Response, error)
- func (s *UserService) List(ctx context.Context) ([]*User, *Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
Types ¶
type BasicAuthTransport ¶
type BasicAuthTransport struct { Server string Username string Password string // Transport is the underlying HTTP transport to use when making requests. // It will default to http.DefaultTransport if nil. Transport http.RoundTripper }
BasicAuthTransport is an http.RoundTripper that authenticates all requests using HTTP Basic Authentication with the provided username and password.
func (*BasicAuthTransport) Client ¶
func (t *BasicAuthTransport) Client() *http.Client
Client returns an *http.Client that makes requests that are authenticated using HTTP Basic Authentication.
type Client ¶
type Client struct { // Base URL for API requests. BaseURL *url.URL // User agent used when communicating with the FreeNAS API. UserAgent string Datasets *DatasetService Users *UserService // contains filtered or unexported fields }
type Dataset ¶
type Dataset struct { Name string `json:"name"` Atime string `json:"atime,omitempty"` Case_sensitivity string `json:"case_sensitivity,omitempty"` Comment string `json:"comment,omitempty"` Compression string `json:"compression,omitempty"` Dedup string `json:"dedup,omitempty"` Readonly string `json:"readonly,omitempty"` Quota int64 `json:"quota,omitempty"` Recordsize int64 `json:"recordsize,omitempty"` Refquota int64 `json:"refquota,omitempty"` Refreservation int64 `json:"refreservation,omitempty"` Reservation int64 `json:"reservation,omitempty"` }
type DatasetService ¶
type DatasetService service
func (*DatasetService) Create ¶
func (s *DatasetService) Create(ctx context.Context, parent string, dataset Dataset) (*Dataset, *Response, error)
Create a new dataset
type ErrorResponse ¶
type ErrorResponse struct{}
func (*ErrorResponse) Error ¶
func (*ErrorResponse) Error() string
type ListOptions ¶
type NfsShareService ¶
type NfsShareService service
type User ¶
type User struct { ID int64 `json:"id,omitempty"` UID int64 `json:"bsdusr_uid,omitempty"` Group int64 `json:"bsdusr_group,omitempty"` Builtin bool `json:"bsdusr_builtin,omitempty"` Email string `json:"bsdusr_email,omitempty"` Name string `json:"bsdusr_full_name,omitempty"` Home string `json:"bsdusr_home,omitempty"` Locked bool `json:"bsdusr_locked,omitempty"` Disabled bool `json:"bsdusr_password_disabled,omitempty"` Shell string `json:"bsdusr_shell,omitempty"` Smbhash string `json:"bsdusr_smbhash,omitempty"` Sshpubkey string `json:"bsdusr_sshpubkey,omitempty"` Unixhash string `json:"bsdusr_unixhash,omitempty"` Username string `json:"bsdusr_username,omitempty"` Sudo bool `json:"bsdusr_sudo,omitempty"` }
Click to show internal directories.
Click to hide internal directories.