package
0.0.0-20250130030821-08ec797ce932
Repository: https://github.com/alexhokl/file-server.git
Documentation: pkg.go.dev

# Functions

CreateUser godoc @Summary Create user @Description Create a new user @Tags users @Accept json @Produce json @Param request body createUserRequest true "User information" @Success 201 {object} createdUserResponse @Failure 400 "empty username" @Failure 409 "username already exists" @Failure 500 "unable to create user" @Router /users [post].
CreateUserCredential godoc @Summary Create user credential @Description Create a new credential for a user @Tags credentials @Accept json @Produce json @Param username path string true "Username" @Param request body createUserCredentialRequest true "Credential information" @Success 201 {object} createUserCredentialResponse @Failure 400 "empty username or invalid public key" @Failure 404 "user not found" @Failure 409 "public key already exists" @Failure 500 "unable to create user credential" @Router /users/{username}/credentials [post].
DeleteUser godoc @Summary Delete user @Description Delete a user @Tags users @Accept json @Produce json @Param username path string true "Username" @Success 204 "user deleted" @Failure 400 "empty username" @Failure 404 "user not found" @Failure 500 "unable to delete user" @Router /users/{username} [delete].
DeleteUserCredential godoc @Summary Delete user credential @Description Delete a credential of a user @Tags credentials @Accept json @Produce json @Param username path string true "Username" @Param credential_id path string true "Credential ID" @Success 204 "credential deleted" @Failure 400 "empty username or credential ID" @Failure 404 "credential not found" @Failure 500 "unable to delete user credential" @Router /users/{username}/credentials/{credential_id} [delete].
No description provided by the author
ListUserCredentials godoc @Summary List user credentials @Description List all credentials of a user @Tags credentials @Accept json @Produce json @Param username path string true "Username" @Success 200 {array} credentialInfo @Failure 400 "empty username" @Failure 404 "user not found" @Failure 500 "unable to retrieve user credentials" @Router /users/{username}/credentials [get].
ListUsers godoc @Summary List users @Description List all users @Tags users @Accept json @Produce json @Success 200 {array} string "list of user names" @Router /users [get].