Ash Wilson | a192008 | 2014-08-28 14:24:17 -0400 | [diff] [blame] | 1 | package tokens |
| 2 | |
| 3 | // TokenCreateResult contains the document structure returned from a Create call. |
Ash Wilson | 4a52e2a | 2014-08-29 09:28:00 -0400 | [diff] [blame^] | 4 | type TokenCreateResult struct { |
| 5 | response map[string]interface{} |
| 6 | tokenID string |
| 7 | } |
Ash Wilson | a192008 | 2014-08-28 14:24:17 -0400 | [diff] [blame] | 8 | |
| 9 | // TokenID retrieves a token generated by a Create call from an token creation response. |
Ash Wilson | 4a52e2a | 2014-08-29 09:28:00 -0400 | [diff] [blame^] | 10 | func (r *TokenCreateResult) TokenID() (string, error) { |
| 11 | return r.tokenID, nil |
Ash Wilson | a192008 | 2014-08-28 14:24:17 -0400 | [diff] [blame] | 12 | } |