296 lines
12 KiB
Markdown
296 lines
12 KiB
Markdown
# \AdminApi
|
|
|
|
All URIs are relative to *http://localhost/api/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**AdminCreateOrg**](AdminApi.md#AdminCreateOrg) | **Post** /admin/users/{username}/orgs | Create an organization
|
|
[**AdminCreatePublicKey**](AdminApi.md#AdminCreatePublicKey) | **Post** /admin/users/{username}/keys | Add a public key on behalf of a user
|
|
[**AdminCreateRepo**](AdminApi.md#AdminCreateRepo) | **Post** /admin/users/{username}/repos | Create a repository on behalf of a user
|
|
[**AdminCreateUser**](AdminApi.md#AdminCreateUser) | **Post** /admin/users | Create a user
|
|
[**AdminDeleteUser**](AdminApi.md#AdminDeleteUser) | **Delete** /admin/users/{username} | Delete a user
|
|
[**AdminDeleteUserPublicKey**](AdminApi.md#AdminDeleteUserPublicKey) | **Delete** /admin/users/{username}/keys/{id} | Delete a user's public key
|
|
[**AdminEditUser**](AdminApi.md#AdminEditUser) | **Patch** /admin/users/{username} | Edit an existing user
|
|
[**AdminGetAllOrgs**](AdminApi.md#AdminGetAllOrgs) | **Get** /admin/orgs | List all organizations
|
|
[**AdminGetAllUsers**](AdminApi.md#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**](CreateOrgOption.md)| |
|
|
|
|
### Return type
|
|
|
|
[**Organization**](Organization.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **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**](CreateKeyOption.md)| |
|
|
|
|
### Return type
|
|
|
|
[**PublicKey**](PublicKey.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **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**](CreateRepoOption.md)| |
|
|
|
|
### Return type
|
|
|
|
[**Repository**](Repository.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **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**](CreateUserOption.md)| |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **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](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **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](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **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**](EditUserOption.md)| |
|
|
|
|
### Return type
|
|
|
|
[**User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **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
|
|
|
|
[**[]Organization**](Organization.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **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
|
|
|
|
[**[]User**](User.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json, text/plain
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|