api

package
v0.0.0-...-98bdc43 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EcrBatchGetImage

func EcrBatchGetImage(ctx context.Context, api EcrBatchGetImageAPI, repositoryName string, registryId string, selectedTagName string) ([]types.Image, error)

func EcrClient

func EcrClient(region string) (*ecr.Client, error)

ECR クライアント生成

func EcrDescribeImages

func EcrDescribeImages(ctx context.Context, api EcrDescribeImagesAPI, repositoryName string, registryId string) ([]types.ImageDetail, error)

func EcrPutImage

func EcrPutImage(ctx context.Context, api EcrPutImageAPI, imageManifest string, repositoryName string, registryId string, attachTagName string) error

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router *gin.Engine, si ServerInterface) *gin.Engine

RegisterHandlers creates http.Handler with routing matching OpenAPI spec.

func RegisterHandlersWithOptions

func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine

RegisterHandlersWithOptions creates http.Handler with additional options

func SetTag

func SetTag(ctx context.Context, api ECRAPI, repositoryUri string, attachTagName string, selectedTagName string) error

対象タグを持つイメージにリリースタグを付加

Types

type ECRAPI

ECR API interface

type EcrBatchGetImageAPI

type EcrBatchGetImageAPI interface {
	BatchGetImage(ctx context.Context, params *ecr.BatchGetImageInput, optFns ...func(*ecr.Options)) (*ecr.BatchGetImageOutput, error)
}

ECR BatchGetImage

type EcrDescribeImagesAPI

type EcrDescribeImagesAPI interface {
	DescribeImages(ctx context.Context, params *ecr.DescribeImagesInput, optFns ...func(*ecr.Options)) (*ecr.DescribeImagesOutput, error)
}

ECR DescribeImages

type EcrPutImageAPI

type EcrPutImageAPI interface {
	PutImage(ctx context.Context, params *ecr.PutImageInput, optFns ...func(*ecr.Options)) (*ecr.PutImageOutput, error)
}

ECR PutImage

type Error

type Error struct {
	Message string `json:"message"`
}

Error エラーメッセージモデル

type ErrorResponse

type ErrorResponse = Error

ErrorResponse エラーメッセージモデル

type GinServerOptions

type GinServerOptions struct {
	BaseURL      string
	Middlewares  []MiddlewareFunc
	ErrorHandler func(*gin.Context, error, int)
}

GinServerOptions provides options for the Gin server.

type Image

type Image struct {
	Digest         string    `json:"digest"`
	PushedAt       time.Time `json:"pushed_at"`
	RepositoryName string    `json:"repository_name"`
	Size           float32   `json:"size"`
	Tags           []string  `json:"tags"`
}

Image コンテナイメージモデル

func GetImageList

func GetImageList(imageDetails []types.ImageDetail, repositoryName string, repositoryUri string) []Image

ImageList を取得

func ImageList

func ImageList(ctx context.Context, api ECRAPI, repositoryUri string) ([]Image, error)

ECR リポジトリ内イメージ一覧取得

type ImageTag

type ImageTag struct {
	Tag string `json:"tag"`
}

ImageTag defines model for ImageTag.

type ImagesRequest

type ImagesRequest = ImageTag

ImagesRequest defines model for imagesRequest.

type ImagesResponse

type ImagesResponse = []Image

ImagesResponse defines model for imagesResponse.

type MiddlewareFunc

type MiddlewareFunc func(c *gin.Context)

type PostImagesJSONRequestBody

type PostImagesJSONRequestBody = ImageTag

PostImagesJSONRequestBody defines body for PostImages for application/json ContentType.

type ServerInterface

type ServerInterface interface {
	// コンテナイメージ一覧の取得
	// (GET /images)
	GetImages(c *gin.Context)
	// リリースタグセット
	// (POST /images)
	PostImages(c *gin.Context)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandler       func(*gin.Context, error, int)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetImages

func (siw *ServerInterfaceWrapper) GetImages(c *gin.Context)

GetImages operation middleware

func (*ServerInterfaceWrapper) PostImages

func (siw *ServerInterfaceWrapper) PostImages(c *gin.Context)

PostImages operation middleware

type SetReleaseTag

type SetReleaseTag struct {
	RepositoryUri string
	TagName       string
}

func NewSetReleaseTag

func NewSetReleaseTag(repositoryUri string, tagName string) *SetReleaseTag

func (*SetReleaseTag) GetImages

func (s *SetReleaseTag) GetImages(c *gin.Context)

コンテナイメージ一覧の取得

func (*SetReleaseTag) PostImages

func (s *SetReleaseTag) PostImages(c *gin.Context)

リリース対象のタグ設定後コンテナイメージ一覧取得

Jump to

Keyboard shortcuts

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