Documentation ¶
Index ¶
- Variables
- func AssertApiV1alpha1UserAddonsRequired(obj ApiV1alpha1UserAddons) error
- func AssertCreateUserRequestRequired(obj CreateUserRequest) error
- func AssertCreateUserResponseRequired(obj CreateUserResponse) error
- func AssertCreateWorkspaceRequestRequired(obj CreateWorkspaceRequest) error
- func AssertCreateWorkspaceResponseRequired(obj CreateWorkspaceResponse) error
- func AssertDeleteUserResponseRequired(obj DeleteUserResponse) error
- func AssertDeleteWorkspaceResponseRequired(obj DeleteWorkspaceResponse) error
- func AssertErrorResponseRequired(obj ErrorResponse) error
- func AssertGetUserResponseRequired(obj GetUserResponse) error
- func AssertGetWorkspaceResponseRequired(obj GetWorkspaceResponse) error
- func AssertListTemplatesResponseRequired(obj ListTemplatesResponse) error
- func AssertListUsersResponseRequired(obj ListUsersResponse) error
- func AssertListWorkspaceResponseRequired(obj ListWorkspaceResponse) error
- func AssertLoginRequestRequired(obj LoginRequest) error
- func AssertLoginResponseRequired(obj LoginResponse) error
- func AssertNetworkRuleRequired(obj NetworkRule) error
- func AssertPatchWorkspaceRequestRequired(obj PatchWorkspaceRequest) error
- func AssertPatchWorkspaceResponseRequired(obj PatchWorkspaceResponse) error
- func AssertRecurseApiV1alpha1UserAddonsRequired(objSlice interface{}) error
- func AssertRecurseCreateUserRequestRequired(objSlice interface{}) error
- func AssertRecurseCreateUserResponseRequired(objSlice interface{}) error
- func AssertRecurseCreateWorkspaceRequestRequired(objSlice interface{}) error
- func AssertRecurseCreateWorkspaceResponseRequired(objSlice interface{}) error
- func AssertRecurseDeleteUserResponseRequired(objSlice interface{}) error
- func AssertRecurseDeleteWorkspaceResponseRequired(objSlice interface{}) error
- func AssertRecurseErrorResponseRequired(objSlice interface{}) error
- func AssertRecurseGetUserResponseRequired(objSlice interface{}) error
- func AssertRecurseGetWorkspaceResponseRequired(objSlice interface{}) error
- func AssertRecurseInterfaceRequired(obj interface{}, callback func(interface{}) error) error
- func AssertRecurseListTemplatesResponseRequired(objSlice interface{}) error
- func AssertRecurseListUsersResponseRequired(objSlice interface{}) error
- func AssertRecurseListWorkspaceResponseRequired(objSlice interface{}) error
- func AssertRecurseLoginRequestRequired(objSlice interface{}) error
- func AssertRecurseLoginResponseRequired(objSlice interface{}) error
- func AssertRecurseNetworkRuleRequired(objSlice interface{}) error
- func AssertRecursePatchWorkspaceRequestRequired(objSlice interface{}) error
- func AssertRecursePatchWorkspaceResponseRequired(objSlice interface{}) error
- func AssertRecurseRemoveNetworkRuleResponseRequired(objSlice interface{}) error
- func AssertRecurseTemplateRequired(objSlice interface{}) error
- func AssertRecurseTemplateRequiredVarsRequired(objSlice interface{}) error
- func AssertRecurseUpdateUserNameRequestRequired(objSlice interface{}) error
- func AssertRecurseUpdateUserNameResponseRequired(objSlice interface{}) error
- func AssertRecurseUpdateUserPasswordRequestRequired(objSlice interface{}) error
- func AssertRecurseUpdateUserPasswordResponseRequired(objSlice interface{}) error
- func AssertRecurseUpdateUserRoleRequestRequired(objSlice interface{}) error
- func AssertRecurseUpdateUserRoleResponseRequired(objSlice interface{}) error
- func AssertRecurseUpsertNetworkRuleRequestRequired(objSlice interface{}) error
- func AssertRecurseUpsertNetworkRuleResponseRequired(objSlice interface{}) error
- func AssertRecurseUserRequired(objSlice interface{}) error
- func AssertRecurseValueRequired(value reflect.Value, callback func(interface{}) error) error
- func AssertRecurseVerifyResponseRequired(objSlice interface{}) error
- func AssertRecurseWorkspaceRequired(objSlice interface{}) error
- func AssertRecurseWorkspaceSpecRequired(objSlice interface{}) error
- func AssertRecurseWorkspaceStatusRequired(objSlice interface{}) error
- func AssertRemoveNetworkRuleResponseRequired(obj RemoveNetworkRuleResponse) error
- func AssertTemplateRequired(obj Template) error
- func AssertTemplateRequiredVarsRequired(obj TemplateRequiredVars) error
- func AssertUpdateUserNameRequestRequired(obj UpdateUserNameRequest) error
- func AssertUpdateUserNameResponseRequired(obj UpdateUserNameResponse) error
- func AssertUpdateUserPasswordRequestRequired(obj UpdateUserPasswordRequest) error
- func AssertUpdateUserPasswordResponseRequired(obj UpdateUserPasswordResponse) error
- func AssertUpdateUserRoleRequestRequired(obj UpdateUserRoleRequest) error
- func AssertUpdateUserRoleResponseRequired(obj UpdateUserRoleResponse) error
- func AssertUpsertNetworkRuleRequestRequired(obj UpsertNetworkRuleRequest) error
- func AssertUpsertNetworkRuleResponseRequired(obj UpsertNetworkRuleResponse) error
- func AssertUserRequired(obj User) error
- func AssertVerifyResponseRequired(obj VerifyResponse) error
- func AssertWorkspaceRequired(obj Workspace) error
- func AssertWorkspaceSpecRequired(obj WorkspaceSpec) error
- func AssertWorkspaceStatusRequired(obj WorkspaceStatus) error
- func DefaultErrorHandler(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)
- func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
- func IsZeroValue(val interface{}) bool
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter(routers ...Router) *mux.Router
- type ApiV1alpha1UserAddons
- type AuthApiController
- type AuthApiOption
- type AuthApiRouter
- type AuthApiServicer
- type CreateUserRequest
- type CreateUserResponse
- type CreateWorkspaceRequest
- type CreateWorkspaceResponse
- type DeleteUserResponse
- type DeleteWorkspaceResponse
- type ErrorHandler
- type ErrorResponse
- type GetUserResponse
- type GetWorkspaceResponse
- type ImplResponse
- type ListTemplatesResponse
- type ListUsersResponse
- type ListWorkspaceResponse
- type LoginRequest
- type LoginResponse
- type NetworkRule
- type ParsingError
- type PatchWorkspaceRequest
- type PatchWorkspaceResponse
- type RemoveNetworkRuleResponse
- type RequiredError
- type Route
- type Router
- func NewAuthApiController(s AuthApiServicer, opts ...AuthApiOption) Router
- func NewTemplateApiController(s TemplateApiServicer, opts ...TemplateApiOption) Router
- func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router
- func NewWorkspaceApiController(s WorkspaceApiServicer, opts ...WorkspaceApiOption) Router
- type Routes
- type Template
- type TemplateApiController
- type TemplateApiOption
- type TemplateApiRouter
- type TemplateApiServicer
- type TemplateRequiredVars
- type UpdateUserNameRequest
- type UpdateUserNameResponse
- type UpdateUserPasswordRequest
- type UpdateUserPasswordResponse
- type UpdateUserRoleRequest
- type UpdateUserRoleResponse
- type UpsertNetworkRuleRequest
- type UpsertNetworkRuleResponse
- type User
- type UserApiController
- func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (c *UserApiController) GetUser(w http.ResponseWriter, r *http.Request)
- func (c *UserApiController) GetUsers(w http.ResponseWriter, r *http.Request)
- func (c *UserApiController) PostUser(w http.ResponseWriter, r *http.Request)
- func (c *UserApiController) PutUserName(w http.ResponseWriter, r *http.Request)
- func (c *UserApiController) PutUserPassword(w http.ResponseWriter, r *http.Request)
- func (c *UserApiController) PutUserRole(w http.ResponseWriter, r *http.Request)
- func (c *UserApiController) Routes() Routes
- type UserApiOption
- type UserApiRouter
- type UserApiServicer
- type VerifyResponse
- type Workspace
- type WorkspaceApiController
- func (c *WorkspaceApiController) DeleteNetworkRule(w http.ResponseWriter, r *http.Request)
- func (c *WorkspaceApiController) DeleteWorkspace(w http.ResponseWriter, r *http.Request)
- func (c *WorkspaceApiController) GetWorkspace(w http.ResponseWriter, r *http.Request)
- func (c *WorkspaceApiController) GetWorkspaces(w http.ResponseWriter, r *http.Request)
- func (c *WorkspaceApiController) PatchWorkspace(w http.ResponseWriter, r *http.Request)
- func (c *WorkspaceApiController) PostWorkspace(w http.ResponseWriter, r *http.Request)
- func (c *WorkspaceApiController) PutNetworkRule(w http.ResponseWriter, r *http.Request)
- func (c *WorkspaceApiController) Routes() Routes
- type WorkspaceApiOption
- type WorkspaceApiRouter
- type WorkspaceApiServicer
- type WorkspaceSpec
- type WorkspaceStatus
Constants ¶
This section is empty.
Variables ¶
var ( // ErrTypeAssertionError is thrown when type an interface does not match the asserted type ErrTypeAssertionError = errors.New("unable to assert type") )
Functions ¶
func AssertApiV1alpha1UserAddonsRequired ¶ added in v0.2.0
func AssertApiV1alpha1UserAddonsRequired(obj ApiV1alpha1UserAddons) error
AssertApiV1alpha1UserAddonsRequired checks if the required fields are not zero-ed
func AssertCreateUserRequestRequired ¶
func AssertCreateUserRequestRequired(obj CreateUserRequest) error
AssertCreateUserRequestRequired checks if the required fields are not zero-ed
func AssertCreateUserResponseRequired ¶
func AssertCreateUserResponseRequired(obj CreateUserResponse) error
AssertCreateUserResponseRequired checks if the required fields are not zero-ed
func AssertCreateWorkspaceRequestRequired ¶
func AssertCreateWorkspaceRequestRequired(obj CreateWorkspaceRequest) error
AssertCreateWorkspaceRequestRequired checks if the required fields are not zero-ed
func AssertCreateWorkspaceResponseRequired ¶
func AssertCreateWorkspaceResponseRequired(obj CreateWorkspaceResponse) error
AssertCreateWorkspaceResponseRequired checks if the required fields are not zero-ed
func AssertDeleteUserResponseRequired ¶
func AssertDeleteUserResponseRequired(obj DeleteUserResponse) error
AssertDeleteUserResponseRequired checks if the required fields are not zero-ed
func AssertDeleteWorkspaceResponseRequired ¶
func AssertDeleteWorkspaceResponseRequired(obj DeleteWorkspaceResponse) error
AssertDeleteWorkspaceResponseRequired checks if the required fields are not zero-ed
func AssertErrorResponseRequired ¶ added in v0.4.0
func AssertErrorResponseRequired(obj ErrorResponse) error
AssertErrorResponseRequired checks if the required fields are not zero-ed
func AssertGetUserResponseRequired ¶
func AssertGetUserResponseRequired(obj GetUserResponse) error
AssertGetUserResponseRequired checks if the required fields are not zero-ed
func AssertGetWorkspaceResponseRequired ¶
func AssertGetWorkspaceResponseRequired(obj GetWorkspaceResponse) error
AssertGetWorkspaceResponseRequired checks if the required fields are not zero-ed
func AssertListTemplatesResponseRequired ¶
func AssertListTemplatesResponseRequired(obj ListTemplatesResponse) error
AssertListTemplatesResponseRequired checks if the required fields are not zero-ed
func AssertListUsersResponseRequired ¶
func AssertListUsersResponseRequired(obj ListUsersResponse) error
AssertListUsersResponseRequired checks if the required fields are not zero-ed
func AssertListWorkspaceResponseRequired ¶
func AssertListWorkspaceResponseRequired(obj ListWorkspaceResponse) error
AssertListWorkspaceResponseRequired checks if the required fields are not zero-ed
func AssertLoginRequestRequired ¶
func AssertLoginRequestRequired(obj LoginRequest) error
AssertLoginRequestRequired checks if the required fields are not zero-ed
func AssertLoginResponseRequired ¶
func AssertLoginResponseRequired(obj LoginResponse) error
AssertLoginResponseRequired checks if the required fields are not zero-ed
func AssertNetworkRuleRequired ¶
func AssertNetworkRuleRequired(obj NetworkRule) error
AssertNetworkRuleRequired checks if the required fields are not zero-ed
func AssertPatchWorkspaceRequestRequired ¶
func AssertPatchWorkspaceRequestRequired(obj PatchWorkspaceRequest) error
AssertPatchWorkspaceRequestRequired checks if the required fields are not zero-ed
func AssertPatchWorkspaceResponseRequired ¶
func AssertPatchWorkspaceResponseRequired(obj PatchWorkspaceResponse) error
AssertPatchWorkspaceResponseRequired checks if the required fields are not zero-ed
func AssertRecurseApiV1alpha1UserAddonsRequired ¶ added in v0.2.0
func AssertRecurseApiV1alpha1UserAddonsRequired(objSlice interface{}) error
AssertRecurseApiV1alpha1UserAddonsRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ApiV1alpha1UserAddons (e.g. [][]ApiV1alpha1UserAddons), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseCreateUserRequestRequired ¶
func AssertRecurseCreateUserRequestRequired(objSlice interface{}) error
AssertRecurseCreateUserRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of CreateUserRequest (e.g. [][]CreateUserRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseCreateUserResponseRequired ¶
func AssertRecurseCreateUserResponseRequired(objSlice interface{}) error
AssertRecurseCreateUserResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of CreateUserResponse (e.g. [][]CreateUserResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseCreateWorkspaceRequestRequired ¶
func AssertRecurseCreateWorkspaceRequestRequired(objSlice interface{}) error
AssertRecurseCreateWorkspaceRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of CreateWorkspaceRequest (e.g. [][]CreateWorkspaceRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseCreateWorkspaceResponseRequired ¶
func AssertRecurseCreateWorkspaceResponseRequired(objSlice interface{}) error
AssertRecurseCreateWorkspaceResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of CreateWorkspaceResponse (e.g. [][]CreateWorkspaceResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDeleteUserResponseRequired ¶
func AssertRecurseDeleteUserResponseRequired(objSlice interface{}) error
AssertRecurseDeleteUserResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DeleteUserResponse (e.g. [][]DeleteUserResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseDeleteWorkspaceResponseRequired ¶
func AssertRecurseDeleteWorkspaceResponseRequired(objSlice interface{}) error
AssertRecurseDeleteWorkspaceResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of DeleteWorkspaceResponse (e.g. [][]DeleteWorkspaceResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseErrorResponseRequired ¶ added in v0.4.0
func AssertRecurseErrorResponseRequired(objSlice interface{}) error
AssertRecurseErrorResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ErrorResponse (e.g. [][]ErrorResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseGetUserResponseRequired ¶
func AssertRecurseGetUserResponseRequired(objSlice interface{}) error
AssertRecurseGetUserResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of GetUserResponse (e.g. [][]GetUserResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseGetWorkspaceResponseRequired ¶
func AssertRecurseGetWorkspaceResponseRequired(objSlice interface{}) error
AssertRecurseGetWorkspaceResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of GetWorkspaceResponse (e.g. [][]GetWorkspaceResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseInterfaceRequired ¶
AssertInterfaceRequired recursively checks each struct in a slice against the callback. This method traverse nested slices in a preorder fashion.
func AssertRecurseListTemplatesResponseRequired ¶
func AssertRecurseListTemplatesResponseRequired(objSlice interface{}) error
AssertRecurseListTemplatesResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ListTemplatesResponse (e.g. [][]ListTemplatesResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseListUsersResponseRequired ¶
func AssertRecurseListUsersResponseRequired(objSlice interface{}) error
AssertRecurseListUsersResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ListUsersResponse (e.g. [][]ListUsersResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseListWorkspaceResponseRequired ¶
func AssertRecurseListWorkspaceResponseRequired(objSlice interface{}) error
AssertRecurseListWorkspaceResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of ListWorkspaceResponse (e.g. [][]ListWorkspaceResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseLoginRequestRequired ¶
func AssertRecurseLoginRequestRequired(objSlice interface{}) error
AssertRecurseLoginRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of LoginRequest (e.g. [][]LoginRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseLoginResponseRequired ¶
func AssertRecurseLoginResponseRequired(objSlice interface{}) error
AssertRecurseLoginResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of LoginResponse (e.g. [][]LoginResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseNetworkRuleRequired ¶
func AssertRecurseNetworkRuleRequired(objSlice interface{}) error
AssertRecurseNetworkRuleRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of NetworkRule (e.g. [][]NetworkRule), otherwise ErrTypeAssertionError is thrown.
func AssertRecursePatchWorkspaceRequestRequired ¶
func AssertRecursePatchWorkspaceRequestRequired(objSlice interface{}) error
AssertRecursePatchWorkspaceRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of PatchWorkspaceRequest (e.g. [][]PatchWorkspaceRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecursePatchWorkspaceResponseRequired ¶
func AssertRecursePatchWorkspaceResponseRequired(objSlice interface{}) error
AssertRecursePatchWorkspaceResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of PatchWorkspaceResponse (e.g. [][]PatchWorkspaceResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseRemoveNetworkRuleResponseRequired ¶
func AssertRecurseRemoveNetworkRuleResponseRequired(objSlice interface{}) error
AssertRecurseRemoveNetworkRuleResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of RemoveNetworkRuleResponse (e.g. [][]RemoveNetworkRuleResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseTemplateRequired ¶
func AssertRecurseTemplateRequired(objSlice interface{}) error
AssertRecurseTemplateRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Template (e.g. [][]Template), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseTemplateRequiredVarsRequired ¶ added in v0.2.0
func AssertRecurseTemplateRequiredVarsRequired(objSlice interface{}) error
AssertRecurseTemplateRequiredVarsRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of TemplateRequiredVars (e.g. [][]TemplateRequiredVars), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseUpdateUserNameRequestRequired ¶ added in v0.3.0
func AssertRecurseUpdateUserNameRequestRequired(objSlice interface{}) error
AssertRecurseUpdateUserNameRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of UpdateUserNameRequest (e.g. [][]UpdateUserNameRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseUpdateUserNameResponseRequired ¶ added in v0.3.0
func AssertRecurseUpdateUserNameResponseRequired(objSlice interface{}) error
AssertRecurseUpdateUserNameResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of UpdateUserNameResponse (e.g. [][]UpdateUserNameResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseUpdateUserPasswordRequestRequired ¶
func AssertRecurseUpdateUserPasswordRequestRequired(objSlice interface{}) error
AssertRecurseUpdateUserPasswordRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of UpdateUserPasswordRequest (e.g. [][]UpdateUserPasswordRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseUpdateUserPasswordResponseRequired ¶
func AssertRecurseUpdateUserPasswordResponseRequired(objSlice interface{}) error
AssertRecurseUpdateUserPasswordResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of UpdateUserPasswordResponse (e.g. [][]UpdateUserPasswordResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseUpdateUserRoleRequestRequired ¶
func AssertRecurseUpdateUserRoleRequestRequired(objSlice interface{}) error
AssertRecurseUpdateUserRoleRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of UpdateUserRoleRequest (e.g. [][]UpdateUserRoleRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseUpdateUserRoleResponseRequired ¶
func AssertRecurseUpdateUserRoleResponseRequired(objSlice interface{}) error
AssertRecurseUpdateUserRoleResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of UpdateUserRoleResponse (e.g. [][]UpdateUserRoleResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseUpsertNetworkRuleRequestRequired ¶
func AssertRecurseUpsertNetworkRuleRequestRequired(objSlice interface{}) error
AssertRecurseUpsertNetworkRuleRequestRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of UpsertNetworkRuleRequest (e.g. [][]UpsertNetworkRuleRequest), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseUpsertNetworkRuleResponseRequired ¶
func AssertRecurseUpsertNetworkRuleResponseRequired(objSlice interface{}) error
AssertRecurseUpsertNetworkRuleResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of UpsertNetworkRuleResponse (e.g. [][]UpsertNetworkRuleResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseUserRequired ¶
func AssertRecurseUserRequired(objSlice interface{}) error
AssertRecurseUserRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of User (e.g. [][]User), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseValueRequired ¶
AssertNestedValueRequired checks each struct in the nested slice against the callback. This method traverse nested slices in a preorder fashion.
func AssertRecurseVerifyResponseRequired ¶
func AssertRecurseVerifyResponseRequired(objSlice interface{}) error
AssertRecurseVerifyResponseRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of VerifyResponse (e.g. [][]VerifyResponse), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseWorkspaceRequired ¶
func AssertRecurseWorkspaceRequired(objSlice interface{}) error
AssertRecurseWorkspaceRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of Workspace (e.g. [][]Workspace), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseWorkspaceSpecRequired ¶
func AssertRecurseWorkspaceSpecRequired(objSlice interface{}) error
AssertRecurseWorkspaceSpecRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of WorkspaceSpec (e.g. [][]WorkspaceSpec), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseWorkspaceStatusRequired ¶
func AssertRecurseWorkspaceStatusRequired(objSlice interface{}) error
AssertRecurseWorkspaceStatusRequired recursively checks if required fields are not zero-ed in a nested slice. Accepts only nested slice of WorkspaceStatus (e.g. [][]WorkspaceStatus), otherwise ErrTypeAssertionError is thrown.
func AssertRemoveNetworkRuleResponseRequired ¶
func AssertRemoveNetworkRuleResponseRequired(obj RemoveNetworkRuleResponse) error
AssertRemoveNetworkRuleResponseRequired checks if the required fields are not zero-ed
func AssertTemplateRequired ¶
AssertTemplateRequired checks if the required fields are not zero-ed
func AssertTemplateRequiredVarsRequired ¶ added in v0.2.0
func AssertTemplateRequiredVarsRequired(obj TemplateRequiredVars) error
AssertTemplateRequiredVarsRequired checks if the required fields are not zero-ed
func AssertUpdateUserNameRequestRequired ¶ added in v0.3.0
func AssertUpdateUserNameRequestRequired(obj UpdateUserNameRequest) error
AssertUpdateUserNameRequestRequired checks if the required fields are not zero-ed
func AssertUpdateUserNameResponseRequired ¶ added in v0.3.0
func AssertUpdateUserNameResponseRequired(obj UpdateUserNameResponse) error
AssertUpdateUserNameResponseRequired checks if the required fields are not zero-ed
func AssertUpdateUserPasswordRequestRequired ¶
func AssertUpdateUserPasswordRequestRequired(obj UpdateUserPasswordRequest) error
AssertUpdateUserPasswordRequestRequired checks if the required fields are not zero-ed
func AssertUpdateUserPasswordResponseRequired ¶
func AssertUpdateUserPasswordResponseRequired(obj UpdateUserPasswordResponse) error
AssertUpdateUserPasswordResponseRequired checks if the required fields are not zero-ed
func AssertUpdateUserRoleRequestRequired ¶
func AssertUpdateUserRoleRequestRequired(obj UpdateUserRoleRequest) error
AssertUpdateUserRoleRequestRequired checks if the required fields are not zero-ed
func AssertUpdateUserRoleResponseRequired ¶
func AssertUpdateUserRoleResponseRequired(obj UpdateUserRoleResponse) error
AssertUpdateUserRoleResponseRequired checks if the required fields are not zero-ed
func AssertUpsertNetworkRuleRequestRequired ¶
func AssertUpsertNetworkRuleRequestRequired(obj UpsertNetworkRuleRequest) error
AssertUpsertNetworkRuleRequestRequired checks if the required fields are not zero-ed
func AssertUpsertNetworkRuleResponseRequired ¶
func AssertUpsertNetworkRuleResponseRequired(obj UpsertNetworkRuleResponse) error
AssertUpsertNetworkRuleResponseRequired checks if the required fields are not zero-ed
func AssertUserRequired ¶
AssertUserRequired checks if the required fields are not zero-ed
func AssertVerifyResponseRequired ¶
func AssertVerifyResponseRequired(obj VerifyResponse) error
AssertVerifyResponseRequired checks if the required fields are not zero-ed
func AssertWorkspaceRequired ¶
AssertWorkspaceRequired checks if the required fields are not zero-ed
func AssertWorkspaceSpecRequired ¶
func AssertWorkspaceSpecRequired(obj WorkspaceSpec) error
AssertWorkspaceSpecRequired checks if the required fields are not zero-ed
func AssertWorkspaceStatusRequired ¶
func AssertWorkspaceStatusRequired(obj WorkspaceStatus) error
AssertWorkspaceStatusRequired checks if the required fields are not zero-ed
func DefaultErrorHandler ¶
func DefaultErrorHandler(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)
DefaultErrorHandler defines the default logic on how to handle errors from the controller. Any errors from parsing request params will return a StatusBadRequest. Otherwise, the error code originating from the servicer will be used.
func EncodeJSONResponse ¶
func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code
func IsZeroValue ¶
func IsZeroValue(val interface{}) bool
IsZeroValue checks if the val is the zero-ed value.
Types ¶
type ApiV1alpha1UserAddons ¶ added in v0.2.0
type AuthApiController ¶
type AuthApiController struct {
// contains filtered or unexported fields
}
AuthApiController binds http requests to an api service and writes the service results to the http response
func (*AuthApiController) Login ¶
func (c *AuthApiController) Login(w http.ResponseWriter, r *http.Request)
Login - Login
func (*AuthApiController) Logout ¶
func (c *AuthApiController) Logout(w http.ResponseWriter, r *http.Request)
Logout - Logout
func (*AuthApiController) Routes ¶
func (c *AuthApiController) Routes() Routes
Routes returns all of the api route for the AuthApiController
func (*AuthApiController) Verify ¶
func (c *AuthApiController) Verify(w http.ResponseWriter, r *http.Request)
Verify - Verify auth
type AuthApiOption ¶
type AuthApiOption func(*AuthApiController)
AuthApiOption for how the controller is set up.
func WithAuthApiErrorHandler ¶
func WithAuthApiErrorHandler(h ErrorHandler) AuthApiOption
WithAuthApiErrorHandler inject ErrorHandler into controller
type AuthApiRouter ¶
type AuthApiRouter interface { Login(http.ResponseWriter, *http.Request) Logout(http.ResponseWriter, *http.Request) Verify(http.ResponseWriter, *http.Request) }
AuthApiRouter defines the required methods for binding the api requests to a responses for the AuthApi The AuthApiRouter implementation should parse necessary information from the http request, pass the data to a AuthApiServicer to perform the required actions, then write the service results to the http response.
type AuthApiServicer ¶
type AuthApiServicer interface { Login(context.Context, LoginRequest) (ImplResponse, error) Logout(context.Context) (ImplResponse, error) Verify(context.Context) (ImplResponse, error) }
AuthApiServicer defines the api actions for the AuthApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
type CreateUserRequest ¶
type CreateUserRequest struct { Id string `json:"id"` DisplayName string `json:"displayName,omitempty"` Role string `json:"role,omitempty"` AuthType string `json:"authType,omitempty"` Addons []ApiV1alpha1UserAddons `json:"addons,omitempty"` }
type CreateUserResponse ¶
type CreateWorkspaceRequest ¶
type CreateWorkspaceResponse ¶
type DeleteUserResponse ¶
type DeleteWorkspaceResponse ¶
type ErrorHandler ¶
type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)
ErrorHandler defines the required method for handling error. You may implement it and inject this into a controller if you would like errors to be handled differently from the DefaultErrorHandler
type ErrorResponse ¶ added in v0.4.0
type ErrorResponse struct {
Message string `json:"message,omitempty"`
}
type GetUserResponse ¶
type GetUserResponse struct {
User *User `json:"user"`
}
type GetWorkspaceResponse ¶
type GetWorkspaceResponse struct {
Workspace *Workspace `json:"workspace"`
}
type ImplResponse ¶
type ImplResponse struct { Code int Body interface{} }
Implementation response defines an error code with the associated body
func Response ¶
func Response(code int, body interface{}) ImplResponse
Response return a ImplResponse struct filled
type ListTemplatesResponse ¶
type ListUsersResponse ¶
type ListWorkspaceResponse ¶
type LoginRequest ¶
type LoginResponse ¶
type NetworkRule ¶
type ParsingError ¶
type ParsingError struct {
Err error
}
ParsingError indicates that an error has occurred when parsing request parameters
func (*ParsingError) Error ¶
func (e *ParsingError) Error() string
func (*ParsingError) Unwrap ¶
func (e *ParsingError) Unwrap() error
type PatchWorkspaceRequest ¶
type PatchWorkspaceRequest struct {
Replicas *int64 `json:"replicas,omitempty"`
}
type PatchWorkspaceResponse ¶
type RemoveNetworkRuleResponse ¶
type RemoveNetworkRuleResponse struct { Message string `json:"message"` NetworkRule NetworkRule `json:"networkRule"` }
type RequiredError ¶
type RequiredError struct {
Field string
}
RequiredError indicates that an error has occurred when parsing request parameters
func (*RequiredError) Error ¶
func (e *RequiredError) Error() string
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
A Route defines the parameters for an api endpoint
type Router ¶
type Router interface {
Routes() Routes
}
Router defines the required methods for retrieving api routes
func NewAuthApiController ¶
func NewAuthApiController(s AuthApiServicer, opts ...AuthApiOption) Router
NewAuthApiController creates a default api controller
func NewTemplateApiController ¶
func NewTemplateApiController(s TemplateApiServicer, opts ...TemplateApiOption) Router
NewTemplateApiController creates a default api controller
func NewUserApiController ¶
func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router
NewUserApiController creates a default api controller
func NewWorkspaceApiController ¶
func NewWorkspaceApiController(s WorkspaceApiServicer, opts ...WorkspaceApiOption) Router
NewWorkspaceApiController creates a default api controller
type Template ¶
type Template struct { Name string `json:"name"` Description string `json:"description,omitempty"` RequiredVars []TemplateRequiredVars `json:"requiredVars,omitempty"` IsDefaultUserAddon *bool `json:"isDefaultUserAddon,omitempty"` }
type TemplateApiController ¶
type TemplateApiController struct {
// contains filtered or unexported fields
}
TemplateApiController binds http requests to an api service and writes the service results to the http response
func (*TemplateApiController) GetUserAddonTemplates ¶ added in v0.2.0
func (c *TemplateApiController) GetUserAddonTemplates(w http.ResponseWriter, r *http.Request)
GetUserAddonTemplates - List useraddon templates
func (*TemplateApiController) GetWorkspaceTemplates ¶
func (c *TemplateApiController) GetWorkspaceTemplates(w http.ResponseWriter, r *http.Request)
GetWorkspaceTemplates - List workspace templates
func (*TemplateApiController) Routes ¶
func (c *TemplateApiController) Routes() Routes
Routes returns all of the api route for the TemplateApiController
type TemplateApiOption ¶
type TemplateApiOption func(*TemplateApiController)
TemplateApiOption for how the controller is set up.
func WithTemplateApiErrorHandler ¶
func WithTemplateApiErrorHandler(h ErrorHandler) TemplateApiOption
WithTemplateApiErrorHandler inject ErrorHandler into controller
type TemplateApiRouter ¶
type TemplateApiRouter interface { GetUserAddonTemplates(http.ResponseWriter, *http.Request) GetWorkspaceTemplates(http.ResponseWriter, *http.Request) }
TemplateApiRouter defines the required methods for binding the api requests to a responses for the TemplateApi The TemplateApiRouter implementation should parse necessary information from the http request, pass the data to a TemplateApiServicer to perform the required actions, then write the service results to the http response.
type TemplateApiServicer ¶
type TemplateApiServicer interface { GetUserAddonTemplates(context.Context) (ImplResponse, error) GetWorkspaceTemplates(context.Context) (ImplResponse, error) }
TemplateApiServicer defines the api actions for the TemplateApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
type TemplateRequiredVars ¶ added in v0.2.0
type UpdateUserNameRequest ¶ added in v0.3.0
type UpdateUserNameRequest struct {
DisplayName string `json:"displayName"`
}
type UpdateUserNameResponse ¶ added in v0.3.0
type UpdateUserPasswordResponse ¶
type UpdateUserPasswordResponse struct {
Message string `json:"message"`
}
type UpdateUserRoleRequest ¶
type UpdateUserRoleRequest struct {
Role string `json:"role,omitempty"`
}
type UpdateUserRoleResponse ¶
type UpsertNetworkRuleResponse ¶
type UpsertNetworkRuleResponse struct { Message string `json:"message"` NetworkRule NetworkRule `json:"networkRule"` }
type User ¶
type User struct { Id string `json:"id"` DisplayName string `json:"displayName,omitempty"` Role string `json:"role,omitempty"` AuthType string `json:"authType,omitempty"` Addons []ApiV1alpha1UserAddons `json:"addons,omitempty"` DefaultPassword string `json:"defaultPassword,omitempty"` Status string `json:"status,omitempty"` }
type UserApiController ¶
type UserApiController struct {
// contains filtered or unexported fields
}
UserApiController binds http requests to an api service and writes the service results to the http response
func (*UserApiController) DeleteUser ¶
func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser - Delete user by ID.
func (*UserApiController) GetUser ¶
func (c *UserApiController) GetUser(w http.ResponseWriter, r *http.Request)
GetUser - Get user by ID.
func (*UserApiController) GetUsers ¶
func (c *UserApiController) GetUsers(w http.ResponseWriter, r *http.Request)
GetUsers - Get all users.
func (*UserApiController) PostUser ¶
func (c *UserApiController) PostUser(w http.ResponseWriter, r *http.Request)
PostUser - Create a new User
func (*UserApiController) PutUserName ¶ added in v0.3.0
func (c *UserApiController) PutUserName(w http.ResponseWriter, r *http.Request)
PutUserName - Update user name
func (*UserApiController) PutUserPassword ¶
func (c *UserApiController) PutUserPassword(w http.ResponseWriter, r *http.Request)
PutUserPassword - Update user password
func (*UserApiController) PutUserRole ¶
func (c *UserApiController) PutUserRole(w http.ResponseWriter, r *http.Request)
PutUserRole - Update user role
func (*UserApiController) Routes ¶
func (c *UserApiController) Routes() Routes
Routes returns all of the api route for the UserApiController
type UserApiOption ¶
type UserApiOption func(*UserApiController)
UserApiOption for how the controller is set up.
func WithUserApiErrorHandler ¶
func WithUserApiErrorHandler(h ErrorHandler) UserApiOption
WithUserApiErrorHandler inject ErrorHandler into controller
type UserApiRouter ¶
type UserApiRouter interface { DeleteUser(http.ResponseWriter, *http.Request) GetUser(http.ResponseWriter, *http.Request) GetUsers(http.ResponseWriter, *http.Request) PostUser(http.ResponseWriter, *http.Request) PutUserName(http.ResponseWriter, *http.Request) PutUserPassword(http.ResponseWriter, *http.Request) PutUserRole(http.ResponseWriter, *http.Request) }
UserApiRouter defines the required methods for binding the api requests to a responses for the UserApi The UserApiRouter implementation should parse necessary information from the http request, pass the data to a UserApiServicer to perform the required actions, then write the service results to the http response.
type UserApiServicer ¶
type UserApiServicer interface { DeleteUser(context.Context, string) (ImplResponse, error) GetUser(context.Context, string) (ImplResponse, error) GetUsers(context.Context) (ImplResponse, error) PostUser(context.Context, CreateUserRequest) (ImplResponse, error) PutUserName(context.Context, string, UpdateUserNameRequest) (ImplResponse, error) PutUserPassword(context.Context, string, UpdateUserPasswordRequest) (ImplResponse, error) PutUserRole(context.Context, string, UpdateUserRoleRequest) (ImplResponse, error) }
UserApiServicer defines the api actions for the UserApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
type VerifyResponse ¶
type Workspace ¶
type Workspace struct { Name string `json:"name"` OwnerID string `json:"ownerID,omitempty"` Spec WorkspaceSpec `json:"spec,omitempty"` Status WorkspaceStatus `json:"status,omitempty"` }
type WorkspaceApiController ¶
type WorkspaceApiController struct {
// contains filtered or unexported fields
}
WorkspaceApiController binds http requests to an api service and writes the service results to the http response
func (*WorkspaceApiController) DeleteNetworkRule ¶
func (c *WorkspaceApiController) DeleteNetworkRule(w http.ResponseWriter, r *http.Request)
DeleteNetworkRule - Remove workspace network rule
func (*WorkspaceApiController) DeleteWorkspace ¶
func (c *WorkspaceApiController) DeleteWorkspace(w http.ResponseWriter, r *http.Request)
DeleteWorkspace - Delete workspace.
func (*WorkspaceApiController) GetWorkspace ¶
func (c *WorkspaceApiController) GetWorkspace(w http.ResponseWriter, r *http.Request)
GetWorkspace - Get workspace by name.
func (*WorkspaceApiController) GetWorkspaces ¶
func (c *WorkspaceApiController) GetWorkspaces(w http.ResponseWriter, r *http.Request)
GetWorkspaces - Get all workspace of user.
func (*WorkspaceApiController) PatchWorkspace ¶
func (c *WorkspaceApiController) PatchWorkspace(w http.ResponseWriter, r *http.Request)
PatchWorkspace - Update workspace.
func (*WorkspaceApiController) PostWorkspace ¶
func (c *WorkspaceApiController) PostWorkspace(w http.ResponseWriter, r *http.Request)
PostWorkspace - Create a new Workspace
func (*WorkspaceApiController) PutNetworkRule ¶
func (c *WorkspaceApiController) PutNetworkRule(w http.ResponseWriter, r *http.Request)
PutNetworkRule - Upsert workspace network rule
func (*WorkspaceApiController) Routes ¶
func (c *WorkspaceApiController) Routes() Routes
Routes returns all of the api route for the WorkspaceApiController
type WorkspaceApiOption ¶
type WorkspaceApiOption func(*WorkspaceApiController)
WorkspaceApiOption for how the controller is set up.
func WithWorkspaceApiErrorHandler ¶
func WithWorkspaceApiErrorHandler(h ErrorHandler) WorkspaceApiOption
WithWorkspaceApiErrorHandler inject ErrorHandler into controller
type WorkspaceApiRouter ¶
type WorkspaceApiRouter interface { DeleteNetworkRule(http.ResponseWriter, *http.Request) DeleteWorkspace(http.ResponseWriter, *http.Request) GetWorkspace(http.ResponseWriter, *http.Request) GetWorkspaces(http.ResponseWriter, *http.Request) PatchWorkspace(http.ResponseWriter, *http.Request) PostWorkspace(http.ResponseWriter, *http.Request) PutNetworkRule(http.ResponseWriter, *http.Request) }
WorkspaceApiRouter defines the required methods for binding the api requests to a responses for the WorkspaceApi The WorkspaceApiRouter implementation should parse necessary information from the http request, pass the data to a WorkspaceApiServicer to perform the required actions, then write the service results to the http response.
type WorkspaceApiServicer ¶
type WorkspaceApiServicer interface { DeleteNetworkRule(context.Context, string, string, string) (ImplResponse, error) DeleteWorkspace(context.Context, string, string) (ImplResponse, error) GetWorkspace(context.Context, string, string) (ImplResponse, error) GetWorkspaces(context.Context, string) (ImplResponse, error) PatchWorkspace(context.Context, string, string, PatchWorkspaceRequest) (ImplResponse, error) PostWorkspace(context.Context, string, CreateWorkspaceRequest) (ImplResponse, error) PutNetworkRule(context.Context, string, string, string, UpsertNetworkRuleRequest) (ImplResponse, error) }
WorkspaceApiServicer defines the api actions for the WorkspaceApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
type WorkspaceSpec ¶
type WorkspaceSpec struct { Template string `json:"template"` Replicas int64 `json:"replicas"` Vars map[string]string `json:"vars,omitempty"` AdditionalNetwork []NetworkRule `json:"additionalNetwork,omitempty"` }
type WorkspaceStatus ¶
Source Files ¶
- api.go
- api_auth.go
- api_template.go
- api_user.go
- api_workspace.go
- error.go
- helpers.go
- impl.go
- logger.go
- model__api_v1alpha1_user_addons.go
- model_create_user_request.go
- model_create_user_response.go
- model_create_workspace_request.go
- model_create_workspace_response.go
- model_delete_user_response.go
- model_delete_workspace_response.go
- model_error_response.go
- model_get_user_response.go
- model_get_workspace_response.go
- model_list_templates_response.go
- model_list_users_response.go
- model_list_workspace_response.go
- model_login_request.go
- model_login_response.go
- model_network_rule.go
- model_patch_workspace_request.go
- model_patch_workspace_response.go
- model_remove_network_rule_response.go
- model_template.go
- model_template_required_vars.go
- model_update_user_name_request.go
- model_update_user_name_response.go
- model_update_user_password_request.go
- model_update_user_password_response.go
- model_update_user_role_request.go
- model_update_user_role_response.go
- model_upsert_network_rule_request.go
- model_upsert_network_rule_response.go
- model_user.go
- model_verify_response.go
- model_workspace.go
- model_workspace_spec.go
- model_workspace_status.go
- routers.go