Sha256: 685c63c32e61ab20768c70ed9c50de65df97b0d1b70e769675c06b27eeab02b7
Contents?: true
Size: 899 Bytes
Versions: 36
Compression:
Stored size: 899 Bytes
Contents
package <%= package %> // Type for resource <%= resource.full_dot_name %> type <%= resource.go_type %> struct { // Pointer to client Client *Client <% resource.resources.each do |r| -%> // Resource <%= r.full_dot_name %> <%= r.go_name %> *<%= r.go_type %> <% end -%> <% resource.actions.each do |a| -%> <% a.all_names do |go_name| -%> // Action <%= a.full_dot_name %> <%= go_name %> *<%= a.go_type %> <% end -%> <% end -%> } func New<%= resource.go_type %>(client *Client) *<%= resource.go_type %> { <% resource.actions.each do |a| -%> action<%= a.go_name %> := New<%= a.go_type %>(client) <% end -%> return &<%= resource.go_type %>{ Client: client, <% resource.resources.each do |r| -%> <%= r.go_name %>: New<%= r.go_type %>(client), <% end -%> <% resource.actions.each do |a| -%> <% a.all_names do |go_name| -%> <%= go_name %>: action<%= a.go_name %>, <% end -%> <% end -%> } }
Version data entries
36 entries across 36 versions & 1 rubygems