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 ¶
- func CheckNowReleaseProcessing(settingPath string, serviceName string) bool
- func EcrClient(region string) (*ecr.Client, error)
- func EcrDescribeImages(ctx context.Context, api EcrDescribeImagesAPI, repositoryName string, ...) ([]types.ImageDetail, error)
- func EcrListImages(ctx context.Context, api EcrListImagesAPI, repositoryName string, ...) ([]types.ImageIdentifier, error)
- func GetSwagger() (swagger *openapi3.T, err error)
- func ImageTag(ids []types.ImageIdentifier, tags []string, digest string) string
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router *gin.Engine, si ServerInterface) *gin.Engine
- func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine
- func RemoveSetting(settingPath string, cronPath string, cronCmd string, serviceName string) error
- func UpdateSetting(settingPath string, cronPath string, cronCmd string, cronLog string, ...) error
- type ECRAPI
- type EcrDescribeImagesAPI
- type EcrListImagesAPI
- type Error
- type ErrorResponse
- type GinServerOptions
- type Image
- type ImagesResponse
- type MiddlewareFunc
- type PostSettingJSONRequestBody
- type RepositoriesResponse
- type Repository
- type RepositoryItem
- type RepositoryKey
- type RepositoryName
- type SelectRepository
- func (s *SelectRepository) DeleteSetting(c *gin.Context, serviceName ServiceName)
- func (s *SelectRepository) GetImages(c *gin.Context, serviceName ServiceName, repositoryName RepositoryName)
- func (s *SelectRepository) GetRepositories(c *gin.Context, serviceName ServiceName)
- func (s *SelectRepository) GetServices(c *gin.Context)
- func (s *SelectRepository) GetSetting(c *gin.Context, serviceName ServiceName)
- func (s *SelectRepository) PostSetting(c *gin.Context, serviceName ServiceName)
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) DeleteSetting(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetImages(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetRepositories(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetServices(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetSetting(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostSetting(c *gin.Context)
- type Service
- type ServiceName
- type ServicesResponse
- type Setting
- type SettingItems
- type SettingRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNowReleaseProcessing ¶
リリース処理中かどうか確認
func EcrDescribeImages ¶
func EcrDescribeImages(ctx context.Context, api EcrDescribeImagesAPI, repositoryName string, registryId string) ([]types.ImageDetail, error)
func EcrListImages ¶
func EcrListImages(ctx context.Context, api EcrListImagesAPI, repositoryName string, registryId string) ([]types.ImageIdentifier, error)
func GetSwagger ¶
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 ImageTag ¶
func ImageTag(ids []types.ImageIdentifier, tags []string, digest string) string
対象のイメージタグを検索
func PathToRawSpec ¶
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 RemoveSetting ¶
設定削除
Types ¶
type EcrDescribeImagesAPI ¶
type EcrDescribeImagesAPI interface {
DescribeImages(ctx context.Context, params *ecr.DescribeImagesInput, optFns ...func(*ecr.Options)) (*ecr.DescribeImagesOutput, error)
}
ECR DescribeImages
type EcrListImagesAPI ¶
type EcrListImagesAPI interface {
ListImages(ctx context.Context, params *ecr.ListImagesInput, optFns ...func(*ecr.Options)) (*ecr.ListImagesOutput, error)
}
ECR ListImages
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"` Uri string `json:"uri"` }
Image コンテナイメージモデル
func GetImageList ¶
func GetImageList(imageIds []types.ImageIdentifier, imageDetails []types.ImageDetail, repositoryName string, repositoryUri string) []Image
ImageList を取得
type ImagesResponse ¶
type ImagesResponse = []Image
ImagesResponse defines model for imagesResponse.
type MiddlewareFunc ¶
type PostSettingJSONRequestBody ¶
type PostSettingJSONRequestBody = Setting
PostSettingJSONRequestBody defines body for PostSetting for application/json ContentType.
type RepositoriesResponse ¶
type RepositoriesResponse = []Repository
RepositoriesResponse defines model for repositoriesResponse.
type Repository ¶
Repository リポジトリモデル
func RepositoryList ¶
func RepositoryList(settingPath string, serviceName string) []Repository
サービスのリポジトリ一覧取得
type RepositoryItem ¶
type RepositoryKey ¶
type RepositoryName ¶
type RepositoryName = string
RepositoryName defines model for repository_name.
type SelectRepository ¶
type SelectRepository struct { ServiceName []string RepositoryMap map[string][]Repository RepositoryMap2d map[RepositoryKey]RepositoryItem ServiceSettingPath string CronPath string CronCmd string CronLog string }
func NewSelectRepository ¶
func NewSelectRepository(workDir string, cronPath string, cronCmd string, cronLog string) *SelectRepository
func ReadConfig ¶
func ReadConfig(workDir string, cronPath string, cronCmd string, cronLog string) *SelectRepository
func (*SelectRepository) DeleteSetting ¶
func (s *SelectRepository) DeleteSetting(c *gin.Context, serviceName ServiceName)
リリース設定の削除(リリース取り消し)
func (*SelectRepository) GetImages ¶
func (s *SelectRepository) GetImages(c *gin.Context, serviceName ServiceName, repositoryName RepositoryName)
コンテナイメージ一覧の取得
func (*SelectRepository) GetRepositories ¶
func (s *SelectRepository) GetRepositories(c *gin.Context, serviceName ServiceName)
リポジトリ一覧の取得
func (*SelectRepository) GetServices ¶
func (s *SelectRepository) GetServices(c *gin.Context)
コンテナサービス一覧の取得
func (*SelectRepository) GetSetting ¶
func (s *SelectRepository) GetSetting(c *gin.Context, serviceName ServiceName)
リリース設定の取得
func (*SelectRepository) PostSetting ¶
func (s *SelectRepository) PostSetting(c *gin.Context, serviceName ServiceName)
リリース設定の生成・更新
type ServerInterface ¶
type ServerInterface interface { // コンテナイメージ一覧の取得 // (GET /images/{service_name}/{repository_name}) GetImages(c *gin.Context, serviceName ServiceName, repositoryName RepositoryName) // リポジトリ一覧の取得 // (GET /repositories/{service_name}) GetRepositories(c *gin.Context, serviceName ServiceName) // コンテナサービス一覧の取得 // (GET /services) GetServices(c *gin.Context) // リリース設定の削除 // (DELETE /setting/{service_name}) DeleteSetting(c *gin.Context, serviceName ServiceName) // リリース設定の取得 // (GET /setting/{service_name}) GetSetting(c *gin.Context, serviceName ServiceName) // リリース設定の生成・更新 // (POST /setting/{service_name}) PostSetting(c *gin.Context, serviceName ServiceName) }
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) DeleteSetting ¶
func (siw *ServerInterfaceWrapper) DeleteSetting(c *gin.Context)
DeleteSetting operation middleware
func (*ServerInterfaceWrapper) GetImages ¶
func (siw *ServerInterfaceWrapper) GetImages(c *gin.Context)
GetImages operation middleware
func (*ServerInterfaceWrapper) GetRepositories ¶
func (siw *ServerInterfaceWrapper) GetRepositories(c *gin.Context)
GetRepositories operation middleware
func (*ServerInterfaceWrapper) GetServices ¶
func (siw *ServerInterfaceWrapper) GetServices(c *gin.Context)
GetServices operation middleware
func (*ServerInterfaceWrapper) GetSetting ¶
func (siw *ServerInterfaceWrapper) GetSetting(c *gin.Context)
GetSetting operation middleware
func (*ServerInterfaceWrapper) PostSetting ¶
func (siw *ServerInterfaceWrapper) PostSetting(c *gin.Context)
PostSetting operation middleware
type ServicesResponse ¶
type ServicesResponse = []Service
ServicesResponse defines model for servicesResponse.
type Setting ¶
type Setting struct { ImageUri *string `json:"image_uri,omitempty"` IsReleased bool `json:"is_released"` ReleaseAt *time.Time `json:"release_at,omitempty"` }
Setting リリース設定モデル
type SettingItems ¶
func ReadSettingFromFile ¶
func ReadSettingFromFile(settingFile string) (*SettingItems, error)
指定ファイルから設定を取得