eks.go 431 B

123456789101112131415161718192021222324
  1. package input
  2. import (
  3. "encoding/json"
  4. )
  5. type EKS struct {
  6. AWSRegion string `json:"aws_region"`
  7. AWSAccessKey string `json:"aws_access_key"`
  8. AWSSecretKey string `json:"aws_secret_key"`
  9. ClusterName string `json:"cluster_name"`
  10. }
  11. func (eks *EKS) GetInput() ([]byte, error) {
  12. return json.Marshal(eks)
  13. }
  14. func GetEKSInput(bytes []byte) (*EKS, error) {
  15. res := &EKS{}
  16. err := json.Unmarshal(bytes, res)
  17. return res, err
  18. }