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 EcrClient(region string) (*ecr.Client, error)
- func EcrDescribeImages(ctx context.Context, api EcrDescribeImagesAPI, repositoryName string, ...) ([]types.ImageDetail, error)
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func ReadSettings(pathPrefix string) (*[]UriSetting, error)
- func RegisterHandlers(router *gin.Engine, si ServerInterface) *gin.Engine
- func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine
- type ECRAPI
- type EcrDescribeImagesAPI
- type Error
- type ErrorResponse
- type GinServerOptions
- type LastReleased
- type ListSettings
- type MiddlewareFunc
- type NextRelease
- type ServerInterface
- type ServerInterfaceWrapper
- type SettingItems
- type TagKey
- type TagSetting
- type TagSettingResponse
- type UriSetting
- type UriSettingResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EcrDescribeImages ¶
func EcrDescribeImages(ctx context.Context, api EcrDescribeImagesAPI, repositoryName string, registryId string) ([]types.ImageDetail, 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 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
Types ¶
type EcrDescribeImagesAPI ¶
type EcrDescribeImagesAPI interface {
DescribeImages(ctx context.Context, params *ecr.DescribeImagesInput, optFns ...func(*ecr.Options)) (*ecr.DescribeImagesOutput, error)
}
ECR DescribeImages
type GinServerOptions ¶
type GinServerOptions struct {
BaseURL string
Middlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
GinServerOptions provides options for the Gin server.
type LastReleased ¶
type LastReleased struct {
ImageUri string `json:"image_uri"`
ReleasedAt time.Time `json:"released_at"`
}
LastReleased 最終リリース設定モデル
func ReadLastReleased ¶
func ReadLastReleased(settingPath string, serviceName string) *LastReleased
前回リリース時設定読み込み
type ListSettings ¶
func NewListSettings ¶
func NewListSettings(configPathPrefix string, tagRepositoryUri string, tagKeys *[]TagKey) *ListSettings
func (*ListSettings) GetTagSettings ¶
func (l *ListSettings) GetTagSettings(c *gin.Context)
リリース設定一覧の取得(タグ指定分)
func (*ListSettings) GetUriSettings ¶
func (l *ListSettings) GetUriSettings(c *gin.Context)
リリース設定一覧の取得(URI指定分)
type MiddlewareFunc ¶
type NextRelease ¶
type NextRelease struct {
ImageUri string `json:"image_uri"`
ReleaseAt time.Time `json:"release_at"`
}
NextRelease リリース待ち設定モデル
func ReadNextRelease ¶
func ReadNextRelease(settingPath string, serviceName string) *NextRelease
次回リリース設定読み込み
type ServerInterface ¶
type ServerInterface interface {
// リリース設定の取得(タグ指定分)
// (GET /tagSettings)
GetTagSettings(c *gin.Context)
// リリース設定の取得(URI指定分)
// (GET /uriSettings)
GetUriSettings(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) GetTagSettings ¶
func (siw *ServerInterfaceWrapper) GetTagSettings(c *gin.Context)
GetTagSettings operation middleware
func (*ServerInterfaceWrapper) GetUriSettings ¶
func (siw *ServerInterfaceWrapper) GetUriSettings(c *gin.Context)
GetUriSettings operation middleware
type SettingItems ¶
func ReadSettingFromFile ¶
func ReadSettingFromFile(settingFile string) (*SettingItems, error)
指定ファイルから設定を取得
type TagSetting ¶
type TagSetting struct {
EnvironmentName string `json:"environment_name"`
PushedAt *time.Time `json:"pushed_at,omitempty"`
// Tags 1つも存在しなかった場合は要素が1つだけの配列として文字列「(未指定)」を返す
Tags []string `json:"tags"`
}
TagSetting タグ形式リリース設定モデル
func GetTagSettingList ¶
func GetTagSettingList(imageDetails []types.ImageDetail, tagKeys []TagKey) []TagSetting
TagSettingList を取得
func TagSettingList ¶
func TagSettingList(ctx context.Context, api ECRAPI, repositoryUri string, tagKeys []TagKey) ([]TagSetting, error)
ECR リポジトリ内イメージ一覧取得
type TagSettingResponse ¶
type TagSettingResponse = []TagSetting
TagSettingResponse defines model for tagSettingResponse.
type UriSetting ¶
type UriSetting struct {
EnvironmentName string `json:"environment_name"`
// LastReleased 最終リリース設定モデル
LastReleased *LastReleased `json:"last_released,omitempty"`
// NextRelease リリース待ち設定モデル
NextRelease *NextRelease `json:"next_release,omitempty"`
ServiceName string `json:"service_name"`
}
UriSetting URI形式リリース設定モデル
type UriSettingResponse ¶
type UriSettingResponse = []UriSetting
UriSettingResponse defines model for uriSettingResponse.