This repository has been deprecated and is no longer actively maintained.
- No new features will be added
- Bug fixes will not be provided
- Security updates will not be implemented
- Issues and pull requests will not be reviewed or merged
- Support is no longer available
- For existing users: Consider migrating to an actively maintained alternative
- For new users: We strongly recommend using a different solution
- For contributors: Thank you for your past contributions, but we are no longer accepting new ones
Obtain and manage metadata for owners, services, repositories. Please see README for details. CLIENTS MUST READ!
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: v1
- Package version: 1.0.0
- Generator version: 7.13.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit http://domain.com
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import openapi "github.com/Interhyp/metadata-service-api"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value openapi.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using openapi.ContextOperationServerIndices
and openapi.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
ManagementAPI | GetHealth | Get /health | |
ManagementAPI | GetHealth1 | Get /management/health | |
RestApiV1OwnersAPI | CreateOwner | Post /rest/api/v1/owners/{owner} | create a new owner with a given alias |
RestApiV1OwnersAPI | DeleteOwner | Delete /rest/api/v1/owners/{owner} | delete the owner with a given alias |
RestApiV1OwnersAPI | GetOwner | Get /rest/api/v1/owners/{owner} | get a single owner by alias |
RestApiV1OwnersAPI | GetOwners | Get /rest/api/v1/owners | get owners |
RestApiV1OwnersAPI | PatchOwner | Patch /rest/api/v1/owners/{owner} | patch an existing owner with a given alias |
RestApiV1OwnersAPI | UpdateOwner | Put /rest/api/v1/owners/{owner} | update an existing owner with a given alias |
RestApiV1RepositoriesAPI | GetRepositoriesOfOwner | Get /rest/api/v1/repositories | get repositories |
RestApiV1RepositoriesAPI | GetRepository | Get /rest/api/v1/repositories/{repository} | get a single repository by key |
RestApiV1RepositoriesAPI | PatchRepository | Patch /rest/api/v1/repositories/{repository} | patch an existing repository with the given key |
RestApiV1RepositoriesAPI | RegisterRepository | Post /rest/api/v1/repositories/{repository} | register a new repository with the given key |
RestApiV1RepositoriesAPI | RemoveRepository | Delete /rest/api/v1/repositories/{repository} | remove the repository with the given key |
RestApiV1RepositoriesAPI | UpdateRepository | Put /rest/api/v1/repositories/{repository} | update an existing repository with the given key |
RestApiV1ServicesAPI | DeleteService | Delete /rest/api/v1/services/{service} | delete the service with a given name |
RestApiV1ServicesAPI | GetService | Get /rest/api/v1/services/{service} | get a single service by name |
RestApiV1ServicesAPI | GetServicePromoters | Get /rest/api/v1/services/{service}/promoters | get all users who may promote a service |
RestApiV1ServicesAPI | GetServices | Get /rest/api/v1/services | get services |
RestApiV1ServicesAPI | PatchService | Patch /rest/api/v1/services/{service} | patch an existing service with the given name |
RestApiV1ServicesAPI | RegisterService | Post /rest/api/v1/services/{service} | register a new service with the given name |
RestApiV1ServicesAPI | UpdateService | Put /rest/api/v1/services/{service} | update an existing service with the given name |
WebhooksAPI | PostWebhook | Post /webhooks/vcs/github |
- Binary
- ConditionReferenceDto
- DeletionDto
- ErrorDto
- ExcludeMergeCheckUserDto
- HealthComponent
- Link
- MergeStrategy
- Notification
- NotificationPayload
- OwnerCreateDto
- OwnerDto
- OwnerListDto
- OwnerPatchDto
- PostPromote
- ProtectedRef
- PullRequests
- Quicklink
- RefProtections
- RefProtectionsBranches
- RefProtectionsTags
- RepositoryConfigurationAccessKeyDto
- RepositoryConfigurationDefaultTaskDto
- RepositoryConfigurationDto
- RepositoryConfigurationDtoMergeConfig
- RepositoryConfigurationPatchDto
- RepositoryConfigurationWebhookDto
- RepositoryConfigurationWebhooksDto
- RepositoryCreateDto
- RepositoryDto
- RepositoryListDto
- RepositoryPatchDto
- ServiceCreateDto
- ServiceDto
- ServiceListDto
- ServicePatchDto
- ServicePromotersDto
- ServiceSpecDto
Authentication schemes defined for the API:
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
- Type: HTTP basic authentication
Example
auth := context.WithValue(context.Background(), openapi.ContextBasicAuth, openapi.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime