Sha256: 44f6372b2a3fc06ecb2839f9e48e54897bff3234a9edb76bd70c8abfe58a535c
Contents?: true
Size: 641 Bytes
Versions: 14
Compression:
Stored size: 641 Bytes
Contents
require 'haveapi/go_client/parameters/base' module HaveAPI::GoClient class Parameters::Typed < Parameters::Base handle do |_role, _direction, _name, desc| !%w[Custom Resource].include?(desc[:type]) end protected def do_resolve @go_in_type = get_go_type(desc[:type]) @go_out_type = get_go_type(desc[:type]) end def get_go_type(v) case v when 'String', 'Text', 'Datetime' 'string' when 'Integer' 'int64' when 'Float' 'float64' when 'Boolean' 'bool' else raise "unsupported data type '#{v}'" end end end end
Version data entries
14 entries across 14 versions & 1 rubygems