mirror of
https://github.com/harness/drone.git
synced 2025-05-06 18:01:55 +08:00

Adds the basic for harness embedded mode: - Harness dedicated router with custom APIHandler - Inline Space Creation - Client for Account/Org/Project - Bootstrap (Allows for automated creation of admin user and gitness service (used for all platform required ops)) - Inline harness service principal creation - Ignore flag for ACL.
19 lines
365 B
Go
19 lines
365 B
Go
package request
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
const (
|
|
PathParamUserUID = "userUID"
|
|
PathParamServiceAccountUID = "saUID"
|
|
)
|
|
|
|
func GetUserUIDFromPath(r *http.Request) (string, error) {
|
|
return PathParamOrError(r, PathParamUserUID)
|
|
}
|
|
|
|
func GetServiceAccountUIDFromPath(r *http.Request) (string, error) {
|
|
return PathParamOrError(r, PathParamServiceAccountUID)
|
|
}
|