Documentation ¶
Index ¶
- Constants
- Variables
- type Helper
- func (h *Helper) API(serviceModelName string) (*model.SDKAPI, error)
- func (h *Helper) FirstAPIVersion(serviceModelName string) (string, error)
- func (h *Helper) GetAPIVersions(serviceModelName string) ([]string, error)
- func (h *Helper) InjectCustomShapes(sdkapi *ackmodel.SDKAPI) error
- func (h *Helper) ModelAndDocsPath(serviceModelName string) (string, string, error)
- func (h *Helper) WithAPIVersion(apiVersion string)
- func (h *Helper) WithSDKVersion(version string) error
Constants ¶
const ( ShapeNameTemplateList = "%sList" ShapeNameTemplateMap = "%sMap" ShapeNameTemplateKey = "%sKey" )
Variables ¶
var ( ErrInvalidVersionDirectory = errors.New( "expected to find only directories in api model directory but found non-directory", ) ErrNoValidVersionDirectory = errors.New( "no valid version directories found", ) ErrServiceNotFound = errors.New( "no such service", ) ErrAPIVersionNotFound = errors.New( "no such api version", ) )
var (
ErrMemberShapeNotFound = errors.New("base shape not found")
)
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper struct { // Default is "services.k8s.aws" APIGroupSuffix string // contains filtered or unexported fields }
Helper is a helper struct that helps work with the aws-sdk-go models and API model loader
func NewHelper ¶
func NewHelper(basePath string, cfg ackgenconfig.Config) *Helper
NewHelper returns a new SDKHelper object
func (*Helper) FirstAPIVersion ¶
FirstAPIVersion returns the first found API version for a service API. (e.h. "2012-10-03")
func (*Helper) GetAPIVersions ¶
GetAPIVersions returns the list of API Versions found in a service directory.
func (*Helper) InjectCustomShapes ¶
InjectCustomShapes will create custom shapes for each of the spec and status fields that contain CustomFieldConfig values. It will append these values into the list of shapes in the API and update the list of custom shapes in the SDKAPI object.
func (*Helper) ModelAndDocsPath ¶
ModelAndDocsPath returns two string paths to the supplied service's API and doc JSON files
func (*Helper) WithAPIVersion ¶
WithAPIVersion sets the `apiVersion` field.
func (*Helper) WithSDKVersion ¶
WithSDKVersion checks out the sdk git repository to the provided version. To use this function h.basePath should point to a git repository.