Documentation ¶
Index ¶
- Constants
- Variables
- type API
- func (api *API) CreateUser(ctx context.Context, username string) error
- func (api *API) DeleteServer(ctx context.Context, user, servername string) error
- func (api *API) DeleteUser(ctx context.Context, user string) error
- func (api *API) GetUser(ctx context.Context, user string) (*User, error)
- func (api *API) ListUsers(ctx context.Context) ([]User, error)
- func (api *API) Ping(ctx context.Context) error
- func (api *API) StartServer(ctx context.Context, user, servername string, options interface{}) error
- func (api *API) StopServer(ctx context.Context, user, servername string) error
- type Call
- type Error
- type Mock
- func (m *Mock) Close()
- func (m *Mock) CreateAPIToken(username string) *Call
- func (m *Mock) CreateUser(username string) *Call
- func (m *Mock) DeleteServer(username, servername string) *Call
- func (m *Mock) DeleteUser(username string) *Call
- func (m *Mock) GetUser(username string) *Call
- func (m *Mock) ListUsers() *Call
- func (m *Mock) Ping() *Call
- func (m *Mock) Reset()
- func (m *Mock) StartServer(username, servername string, options ...interface{}) *Call
- func (m *Mock) StopServer(username, servername string) *Call
- type Server
- type User
Constants ¶
View Source
const (
// Any ...
Any = `(\S+)`
)
Variables ¶
View Source
var ( // ErrorParamsMistake ... ErrorParamsMistake = &Error{http.StatusBadRequest, "request params wrong"} // ErrorConflict ... ErrorConflict = &Error{http.StatusConflict, "object already exist"} // ErrorNotFound ... ErrorNotFound = &Error{http.StatusNotFound, "object not found"} )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API ...
func (*API) CreateUser ¶
CreateUser create a non-admin user into jupyterhub
func (*API) DeleteServer ¶
DeleteServer ...
func (*API) DeleteUser ¶
DeleteUser ...
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
Mock ...
func NewJupyterHubMock ¶
NewJupyterHubMock hubAddress must be same witch API.addr
func (*Mock) CreateAPIToken ¶
CreateAPIToken ...
func (*Mock) DeleteServer ¶
DeleteServer ...
func (*Mock) StartServer ¶
StartServer ...
func (*Mock) StopServer ¶
StopServer ...
type Server ¶
type Server struct { Name string `json:"name"` Ready bool `json:"ready"` Pending *string `json:"pending"` Stopped bool `json:"stopped"` URL string `json:"url"` LastActivityTime time.Time `json:"last_activity"` ProgressURL string `json:"progress_url"` StartTime time.Time `json:"started"` }
Server ...
Click to show internal directories.
Click to hide internal directories.