Sha256: f514e4a229dfa385f277b9affea902cc212cb1c39899224f9bff3974173e75d4
Contents?: true
Size: 505 Bytes
Versions: 36
Compression:
Stored size: 505 Bytes
Contents
package <%= package %> // Client represents a connection to an API server type Client struct { // API URL Url string // Options for authentication method Authentication Authenticator <% api.resources.each do |r| -%> // Resource <%= r.full_dot_name %> <%= r.go_name %> *<%= r.go_type %> <% end -%> } // Create a new client for API at url func New(url string) *Client { c := &Client{Url: url} <% api.resources.each do |r| -%> c.<%= r.go_name %> = New<%= r.go_type %>(c) <% end -%> return c }
Version data entries
36 entries across 36 versions & 1 rubygems