| 1234567891011121314151617181920212223 |
- package input
- import (
- "encoding/json"
- )
- type GCR struct {
- GCPCredentials string `json:"gcp_credentials"`
- GCPRegion string `json:"gcp_region"`
- GCPProjectID string `json:"gcp_project_id"`
- }
- func (gcr *GCR) GetInput() ([]byte, error) {
- return json.Marshal(gcr)
- }
- func GetGCRInput(bytes []byte) (*GCR, error) {
- res := &GCR{}
- err := json.Unmarshal(bytes, res)
- return res, err
- }
|