handler

package
v0.0.0-...-b9a05f1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2017 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminGetConfigV1Handler

func AdminGetConfigV1Handler(ctx *macaron.Context) (int, []byte)

func AdminGetStatusV1Handler

func AdminGetStatusV1Handler(ctx *macaron.Context) (int, []byte)

func AdminPostMaintenance

func AdminPostMaintenance(ctx *macaron.Context) (int, []byte)

func AdminSetConfigV1Handler

func AdminSetConfigV1Handler(ctx *macaron.Context) (int, []byte)

func AppActiveScanHooksTaskV1Handler

func AppActiveScanHooksTaskV1Handler(ctx *macaron.Context) (int, []byte)

AppActiveScanHooksTaskV1Handler actives a scan task

func AppCallbackScanHooksV1Handler

func AppCallbackScanHooksV1Handler(ctx *macaron.Context) (int, []byte)

AppCallbackScanHooksV1Handler gets callback from container and save the scan result.

func AppDeleteFileV1Handler

func AppDeleteFileV1Handler(ctx *macaron.Context) (int, []byte)

AppDeleteFileV1Handler remove a file from a repo

func AppDiscoveryV1Handler

func AppDiscoveryV1Handler(ctx *macaron.Context) (int, []byte)

func AppGetFileV1Handler

func AppGetFileV1Handler(ctx *macaron.Context) (int, []byte)

AppGetFileV1Handler gets the data of a certain app

func AppGetListAppV1Handler

func AppGetListAppV1Handler(ctx *macaron.Context) (int, []byte)

AppGetListAppV1Handler lists all the files in the namespace/repository

func AppGetManifestsV1Handler

func AppGetManifestsV1Handler(ctx *macaron.Context) (int, []byte)

func AppGetMetaSignV1Handler

func AppGetMetaSignV1Handler(ctx *macaron.Context) (int, []byte)

AppGetMetaSignV1Handler gets the meta signature data

func AppGetMetaV1Handler

func AppGetMetaV1Handler(ctx *macaron.Context) (int, []byte)

AppGetMetaV1Handler gets the meta data of the whole namespace/repository

func AppGetPublicKeyV1Handler

func AppGetPublicKeyV1Handler(ctx *macaron.Context) (int, []byte)

AppGetPublicKeyV1Handler gets the public key of the namespace/repository

func AppGlobalSearchV1Handler

func AppGlobalSearchV1Handler(ctx *macaron.Context) (int, []byte)

Example: curl https://containerops.me/app/v1/search?namespace=genedna&repository=tidb

func AppPatchFileV1Handler

func AppPatchFileV1Handler(ctx *macaron.Context) (int, []byte)

func AppPostFileV1Handler

func AppPostFileV1Handler(ctx *macaron.Context) (int, []byte)

func AppPutFileV1Handler

func AppPutFileV1Handler(ctx *macaron.Context) (int, []byte)

AppPutFileV1Handler creates or updates a certain app

func AppPutManifestV1Handler

func AppPutManifestV1Handler(ctx *macaron.Context) (int, []byte)

func AppRegistScanHooksV1Handler

func AppRegistScanHooksV1Handler(ctx *macaron.Context) (int, []byte)

AppRegistScanHooksV1Handler adds a scan plugin to a user repo TODO: to make it easier as a start, we assume each repo could only have one scan plugin

func AppScopedSearchV1Handler

func AppScopedSearchV1Handler(ctx *macaron.Context) (int, []byte)

Example: curl https://containerops.me/app/v1/genedna/tidb/search?version=beta

func AppcDiscoveryV1Handler

func AppcDiscoveryV1Handler(ctx *macaron.Context) (int, []byte)

AppcDiscoveryV1Handler is

func AppcGetACIV1Handler

func AppcGetACIV1Handler(ctx *macaron.Context)

AppcGetACIV1Handler is

func AppcPostACIV1Handler

func AppcPostACIV1Handler(ctx *macaron.Context) (int, []byte)

AppcPostACIV1Handler is

func AppcPostCompleteV1Handler

func AppcPostCompleteV1Handler(ctx *macaron.Context) (int, []byte)

AppcPostCompleteV1Handler is

func AppcPutACIV1Handler

func AppcPutACIV1Handler(ctx *macaron.Context) (int, []byte)

AppcPutACIV1Handler is

func AppcPutASCV1Handler

func AppcPutASCV1Handler(ctx *macaron.Context) (int, []byte)

AppcPutASCV1Handler is

func AppcPutManifestV1Handler

func AppcPutManifestV1Handler(ctx *macaron.Context) (int, []byte)

AppcPutManifestV1Handler is

func DeleteBlobsUUUIDV2Handler

func DeleteBlobsUUUIDV2Handler(ctx *macaron.Context) (int, []byte)

DeleteBlobsUUUIDV2Handler is

func DeleteBlobsV2Handler

func DeleteBlobsV2Handler(ctx *macaron.Context) (int, []byte)

DeleteBlobsV2Handler is

func DeleteManifestRESTV1Handler

func DeleteManifestRESTV1Handler(ctx *macaron.Context) (int, []byte)

DeleteManifestRESTV1Handler is

func DeleteManifestsV2Handler

func DeleteManifestsV2Handler(ctx *macaron.Context) (int, []byte)

DeleteManifestsV2Handler is

func DeletePacakgeRESTV1Handler

func DeletePacakgeRESTV1Handler(ctx *macaron.Context) (int, []byte)

DeletePacakgeRESTV1Handler is

func DeleteRepositoryRESTV1Handler

func DeleteRepositoryRESTV1Handler(ctx *macaron.Context) (int, []byte)

DeleteRepositoryRESTV1Handler is

func GetBlobsV2Handler

func GetBlobsV2Handler(ctx *macaron.Context)

GetBlobsV2Handler is

func GetBlobsV2LibraryHandler

func GetBlobsV2LibraryHandler(ctx *macaron.Context) (int, []byte)

GetBlobsV2LibraryHandler is

func GetCatalogV2Handler

func GetCatalogV2Handler(ctx *macaron.Context) (int, []byte)

GetCatalogV2Handler is

func GetGPGFileV1Handler

func GetGPGFileV1Handler(ctx *macaron.Context) (int, []byte)

GetGPGFileV1Handler is downloading `dockyard.sh`'s GPG file.

func GetImageAncestryV1Handler

func GetImageAncestryV1Handler(ctx *macaron.Context) (int, []byte)

GetImageAncestryV1Handler

func GetImageJSONV1Handler

func GetImageJSONV1Handler(ctx *macaron.Context) (int, []byte)

GetImageJSONV1Handler is getting image json data function. When docker client push an image, dockyard return http status code '400' or '404' if haven't it. Then the docker client will push the json data and layer file. If dockyard has the image and return 200, the docker client will ignore it and push another iamge.

func GetImageLayerV1Handler

func GetImageLayerV1Handler(ctx *macaron.Context)

GetImageLayerV1Handler

func GetIndexPageV1Handler

func GetIndexPageV1Handler(ctx *macaron.Context)

GetIndexPageV1Handler is the index page of Dockyard web. When with params `/?ac-discovery=1` means access from `rkt trust --prefix={domain}` possibility. Other access maybe come from web browser, and will generate HTML page then return.

func GetManifestPageV1Handler

func GetManifestPageV1Handler(ctx *macaron.Context) (int, []byte)

GetManifestPageV1Handler is the manifest of package page. Docker V1 -> none Docker V2 -> tag manifest Appc -> appc manifest App -> manifest

func GetManifestRESTV1Handler

func GetManifestRESTV1Handler(ctx *macaron.Context) (int, []byte)

GetManifestRESTV1Handler is

func GetManifestsV2Handler

func GetManifestsV2Handler(ctx *macaron.Context) (int, []byte)

GetManifestsV2Handler is

func GetManifestsV2LibraryHandler

func GetManifestsV2LibraryHandler(ctx *macaron.Context) (int, []byte)

GetManifestsV2LibraryHandler is

func GetNamespacePageV1Handler

func GetNamespacePageV1Handler(ctx *macaron.Context) (int, []byte)

GetNamespacePageV1Handler is the namespace page for all types.

func GetPackagePageV1Handler

func GetPackagePageV1Handler(ctx *macaron.Context) (int, []byte)

GetPackagePageV1Handler is the package page. Docker V1 & V2 -> tag Appc -> {name}-{version}-{os}-{arch}.{ext} App -> {name}

func GetPackageRESTV1Hanfdler

func GetPackageRESTV1Hanfdler(ctx *macaron.Context) (int, []byte)

GetPackageRESTV1Hanfdler is

func GetPingV1Handler

func GetPingV1Handler(ctx *macaron.Context) (int, []byte)

GetPingV1Handler returns http.StatusOK(200) when Dockyard provide the Docker Registry V1 support. TODO: Add a config option for provide Docker Registry V1.

func GetPingV2Handler

func GetPingV2Handler(ctx *macaron.Context) (int, []byte)

GetPingV2Handler is https://github.com/docker/distribution/blob/master/docs/spec/api.md#api-version-check

func GetRepositoryImagesV1Handler

func GetRepositoryImagesV1Handler(ctx *macaron.Context) (int, []byte)

GetRepositoryImagesV1Handler will return images json data.

func GetRepositoryPageV1Handler

func GetRepositoryPageV1Handler(ctx *macaron.Context) (int, []byte)

GetRepositoryPageV1Handler is the repository page.

func GetRepositoryRESTV1Handler

func GetRepositoryRESTV1Handler(ctx *macaron.Context) (int, []byte)

GetRepositoryRESTV1Handler is

func GetTagV1Handler

func GetTagV1Handler(ctx *macaron.Context) (int, []byte)

GetTagV1Handler is

func GetTagsListV2Handler

func GetTagsListV2Handler(ctx *macaron.Context) (int, []byte)

GetTagsListV2Handler is

func GetTagsListV2LibraryHandler

func GetTagsListV2LibraryHandler(ctx *macaron.Context) (int, []byte)

GetTagsListV2LibraryHandler is

func GetUsersV1Handler

func GetUsersV1Handler(ctx *macaron.Context) (int, []byte)

GetUsersV1Handler is Docker client login handler functoin, should be integration with [Crew](https://gitub.com/containerops/crew) project. TODO: Integration with Crew project.

func HeadBlobsV2Handler

func HeadBlobsV2Handler(ctx *macaron.Context) (int, []byte)

HeadBlobsV2Handler is

func ImageDeleteFileV1Handler

func ImageDeleteFileV1Handler(ctx *macaron.Context) (int, []byte)

func ImageDiscoveryV1Handler

func ImageDiscoveryV1Handler(ctx *macaron.Context) (int, []byte)

func ImageGetFileV1Handler

func ImageGetFileV1Handler(ctx *macaron.Context) (int, []byte)

func ImageGetListV1Handler

func ImageGetListV1Handler(ctx *macaron.Context) (int, []byte)

func ImageGetManifestsV1Handler

func ImageGetManifestsV1Handler(ctx *macaron.Context) (int, []byte)

func ImageGlobalSearchV1Handler

func ImageGlobalSearchV1Handler(ctx *macaron.Context) (int, []byte)

Global search virtual image, not include private image.

func ImagePatchFileV1Handler

func ImagePatchFileV1Handler(ctx *macaron.Context) (int, []byte)

func ImagePostV1Handler

func ImagePostV1Handler(ctx *macaron.Context) (int, []byte)

func ImagePutFileV1Handler

func ImagePutFileV1Handler(ctx *macaron.Context) (int, []byte)

func ImagePutManifestV1Handler

func ImagePutManifestV1Handler(ctx *macaron.Context) (int, []byte)

func ImageScopedSearchV1Handler

func ImageScopedSearchV1Handler(ctx *macaron.Context) (int, []byte)

func PatchBlobsV2Handler

func PatchBlobsV2Handler(ctx *macaron.Context) (int, []byte)

PatchBlobsV2Handler is Upload a chunk of data for the specified upload. Docker 1.9.x above version saves layer in PATCH methord Docker 1.9.x below version saves layer in PUT methord

func PostBlobsV2Handler

func PostBlobsV2Handler(ctx *macaron.Context) (int, []byte)

PostBlobsV2Handler is Initiate a resumable blob upload. If successful, an upload location will be provided to complete the upload. Optionally, if the digest parameter is present, the request body will be used to complete the upload in a single request.

func PostManifestRESTV1Handler

func PostManifestRESTV1Handler(ctx *macaron.Context) (int, []byte)

PostManifestRESTV1Handler is

func PostPackageRESTV1Handler

func PostPackageRESTV1Handler(ctx *macaron.Context) (int, []byte)

PostPackageRESTV1Handler is

func PostRepositoryRESTV1Handler

func PostRepositoryRESTV1Handler(ctx *macaron.Context) (int, []byte)

PostRepositoryRESTV1Handler is REST API handler function for create repository from web page.

func PostUsersV1Handler

func PostUsersV1Handler(ctx *macaron.Context) (int, []byte)

PostUsersV1Handler In Docker Registry V1, the Docker client will POST /v1/users to create an user. If the Dockyard allow create user in the CLI, should be integration with [Crew](https://github.com/containerops/crew). If don't, Dockyard returns http.StatusUnauthorized(401) for forbidden. TODO: Add a config option for allow/forbidden create user in the CLI, and integrated with [Crew](https://github.com/containerops/crew).

func PutBlobsV2Handler

func PutBlobsV2Handler(ctx *macaron.Context) (int, []byte)

PutBlobsV2Handler is Complete the upload specified by uuid, optionally appending the body as the final chunk.

func PutImageChecksumV1Handler

func PutImageChecksumV1Handler(ctx *macaron.Context) (int, []byte)

PutImageChecksumV1Handler is put image checksum and payload value in the database.

func PutImageJSONV1Handler

func PutImageJSONV1Handler(ctx *macaron.Context) (int, []byte)

PutImageJSONV1Handler is

func PutImageLayerV1Handler

func PutImageLayerV1Handler(ctx *macaron.Context) (int, []byte)

PutImageLayerV1Handler is save image layer file in the server.

func PutManifestRESTV1Handler

func PutManifestRESTV1Handler(ctx *macaron.Context) (int, []byte)

PutManifestRESTV1Handler is

func PutManifestsV2Handler

func PutManifestsV2Handler(ctx *macaron.Context) (int, []byte)

PutManifestsV2Handler is

func PutPackageRESTV1Handler

func PutPackageRESTV1Handler(ctx *macaron.Context) (int, []byte)

PutPackageRESTV1Handler is

func PutRepositoryImagesV1Handler

func PutRepositoryImagesV1Handler(ctx *macaron.Context) (int, []byte)

PutRepositoryImagesV1Handler

func PutRepositoryRESTV1Handler

func PutRepositoryRESTV1Handler(ctx *macaron.Context) (int, []byte)

PutRepositoryRESTV1Handler is

func PutRepositoryV1Handler

func PutRepositoryV1Handler(ctx *macaron.Context) (int, []byte)

PutRepositoryV1Handler will create or update the repository, it's first step of Docker push. TODO: @1 When someone create or update the repository, it will be locked to forbidden others action include pull action. TODO: @2 Add a config option for allow/forbidden Docker client pull action when a repository is locked. TODO: @3 Intergated with [Crew](https://github.com/containerops/crew). TODO: @4 Token will be store in Redis, and link the push action with username@repository.

func PutTagV1Handler

func PutTagV1Handler(ctx *macaron.Context) (int, []byte)

PutTagV1Handler

func SyncGetPingV1Handler

func SyncGetPingV1Handler(ctx *macaron.Context) (int, []byte)

If server status is OK, return HTTP Code 200.

func SyncMasterDeleteRegistryV1Handler

func SyncMasterDeleteRegistryV1Handler(ctx *macaron.Context) (int, []byte)

Delete the slave instance from master.

func SyncMasterPostRegistryV1Handler

func SyncMasterPostRegistryV1Handler(ctx *macaron.Context) (int, []byte)

Receive the slave instance information for registry.

func SyncMasterPutModeRegistryV1Handler

func SyncMasterPutModeRegistryV1Handler(ctx *macaron.Context) (int, []byte)

func SyncSlaveDeleteRegistryV1Handler

func SyncSlaveDeleteRegistryV1Handler(ctx *macaron.Context) (int, []byte)

Delete master in the slave instance.

func SyncSlaveListDataV1Handler

func SyncSlaveListDataV1Handler(ctx *macaron.Context) (int, []byte)

Get the list of data from slave

func SyncSlavePostRegistryV1Handler

func SyncSlavePostRegistryV1Handler(ctx *macaron.Context) (int, []byte)

Add master information in the slave instance, and slave instance will registry itself to the master instance.

func SyncSlavePutFileV1Handler

func SyncSlavePutFileV1Handler(ctx *macaron.Context) (int, []byte)

func SyncSlavePutManifestsV1Handler

func SyncSlavePutManifestsV1Handler(ctx *macaron.Context) (int, []byte)

func SyncSlavePutModeRegistryV1Handler

func SyncSlavePutModeRegistryV1Handler(ctx *macaron.Context) (int, []byte)

Change the instance mode from slave to master.

func SyncSlavePutRegistryV1Handler

func SyncSlavePutRegistryV1Handler(ctx *macaron.Context) (int, []byte)

Change master in the slave instance.

func SyncSlavePutStatusV1Handler

func SyncSlavePutStatusV1Handler(ctx *macaron.Context) (int, []byte)

Types

type AppcPUTDetails

type AppcPUTDetails struct {
	ACIPushVersion string `json:"aci_push_version"`
	Multipart      bool   `json:"multipart"`
	ManifestURL    string `json:"upload_manifest_url"`
	SignatureURL   string `json:"upload_signature_url"`
	ACIURL         string `json:"upload_aci_url"`
	CompletedURL   string `json:"completed_url"`
}

AppcPUTDetails is

type CompleteMsg

type CompleteMsg struct {
	Success      bool   `json:"success"`
	Reason       string `json:"reason,omitempty"`
	ServerReason string `json:"serverreason,omitempty"`
}

CompleteMsg is

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL