Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct { Name string `json:"name,omitempty"` IsDir bool `json:"is_dir,omitempty"` ModTime time.Time `json:"mod_time,omitempty"` Mode string `json:"mode,omitempty"` }
File file struct
type FileResource ¶
type FileResource struct { }
FileResource is the REST layer to the File domain
func (FileResource) WebService ¶
func (f FileResource) WebService() *restful.WebService
WebService creates a new service that can handle REST requests for File resources.
type User ¶
type User struct { ID string `json:"id" description:"identifier of the user"` Name string `json:"name" description:"name of the user" default:"john"` Age int `json:"age" description:"age of the user" default:"21"` }
User is just a sample type
type UserResource ¶
type UserResource struct {
// contains filtered or unexported fields
}
UserResource is the REST layer to the User domain
func (UserResource) WebService ¶
func (u UserResource) WebService() *restful.WebService
WebService creates a new service that can handle REST requests for User resources.
Click to show internal directories.
Click to hide internal directories.