12 KiB
\AdminApi
All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
AdminCreateOrg | Post /admin/users/{username}/orgs | Create an organization |
AdminCreatePublicKey | Post /admin/users/{username}/keys | Add a public key on behalf of a user |
AdminCreateRepo | Post /admin/users/{username}/repos | Create a repository on behalf of a user |
AdminCreateUser | Post /admin/users | Create a user |
AdminDeleteUser | Delete /admin/users/{username} | Delete a user |
AdminDeleteUserPublicKey | Delete /admin/users/{username}/keys/{id} | Delete a user's public key |
AdminEditUser | Patch /admin/users/{username} | Edit an existing user |
AdminGetAllOrgs | Get /admin/orgs | List all organizations |
AdminGetAllUsers | Get /admin/users | List all users |
AdminCreateOrg
Organization AdminCreateOrg(ctx, username, organization) Create an organization
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | username of the user that will own the created organization | |
organization | CreateOrgOption |
Return type
Authorization
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AdminCreatePublicKey
PublicKey AdminCreatePublicKey(ctx, username, optional) Add a public key on behalf of a user
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | username of the user | |
optional | *AdminCreatePublicKeyOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AdminCreatePublicKeyOpts struct
Name | Type | Description | Notes |
---|
key | optional.Interface of CreateKeyOption| |
Return type
Authorization
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AdminCreateRepo
Repository AdminCreateRepo(ctx, username, repository) Create a repository on behalf of a user
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | username of the user. This user will own the created repository | |
repository | CreateRepoOption |
Return type
Authorization
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AdminCreateUser
User AdminCreateUser(ctx, optional) Create a user
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *AdminCreateUserOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AdminCreateUserOpts struct
Name | Type | Description | Notes |
---|---|---|---|
body | optional.Interface of CreateUserOption |
Return type
Authorization
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AdminDeleteUser
AdminDeleteUser(ctx, username) Delete a user
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | username of user to delete |
Return type
(empty response body)
Authorization
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token
HTTP request headers
- Content-Type: application/json, text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AdminDeleteUserPublicKey
AdminDeleteUserPublicKey(ctx, username, id) Delete a user's public key
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | username of user | |
id | int64 | id of the key to delete |
Return type
(empty response body)
Authorization
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token
HTTP request headers
- Content-Type: application/json, text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AdminEditUser
User AdminEditUser(ctx, username, optional) Edit an existing user
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | username of user to edit | |
optional | *AdminEditUserOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AdminEditUserOpts struct
Name | Type | Description | Notes |
---|
body | optional.Interface of EditUserOption| |
Return type
Authorization
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AdminGetAllOrgs
[]Organization AdminGetAllOrgs(ctx, optional) List all organizations
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *AdminGetAllOrgsOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AdminGetAllOrgsOpts struct
Name | Type | Description | Notes |
---|---|---|---|
page | optional.Int32 | page number of results to return (1-based) | |
limit | optional.Int32 | page size of results, maximum page size is 50 |
Return type
Authorization
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token
HTTP request headers
- Content-Type: application/json, text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AdminGetAllUsers
[]User AdminGetAllUsers(ctx, optional) List all users
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *AdminGetAllUsersOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AdminGetAllUsersOpts struct
Name | Type | Description | Notes |
---|---|---|---|
page | optional.Int32 | page number of results to return (1-based) | |
limit | optional.Int32 | page size of results, maximum page size is 50 |
Return type
Authorization
AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token
HTTP request headers
- Content-Type: application/json, text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]