From 201b1c88ab95818f8fbfe02658962bf06638b0f2 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 25 Jan 2016 15:51:39 +0100 Subject: shorten name --- messages.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'messages.go') diff --git a/messages.go b/messages.go index b566b1a..796d0e2 100644 --- a/messages.go +++ b/messages.go @@ -46,7 +46,7 @@ type Authorization struct { Combinations [][]int `json:"combinations,omitempty"` } -func (a Authorization) Supported(sol map[ChallengeType]Solver) []Challenge { +func (a Authorization) Supported(sol map[ChalType]Solver) []Challenge { supported := func(c []int) bool { for _, com := range c { ch := a.Challenges[com] @@ -78,14 +78,14 @@ type Identifier struct { // Challege ... type Challenge struct { - Resource Resource `json:"resource"` // challenge - Type ChallengeType `json:"type"` - Token string `json:"token,omitempty"` - Status Status `json:"status,omitempty"` // e.g. valid - URI string `json:"uri,omitempty"` - Validated *time.Time `json:"validated,omitempty"` - KeyAuthorization string `json:"keyAuthorization,omitempty"` - Err *Problem `json:"error,omitempty"` + Resource Resource `json:"resource"` // challenge + Type ChalType `json:"type"` + Token string `json:"token,omitempty"` + Status Status `json:"status,omitempty"` // e.g. valid + URI string `json:"uri,omitempty"` + Validated *time.Time `json:"validated,omitempty"` + KeyAuthorization string `json:"keyAuthorization,omitempty"` + Err *Problem `json:"error,omitempty"` Solver `json:"-"` } @@ -132,13 +132,13 @@ type IdentType string const IdentDNS IdentType = "dns" -type ChallengeType string +type ChalType string const ( - ChallengeHTTP ChallengeType = "http-01" - ChallengeTLS ChallengeType = "tls-sni-01" - ChallengePOP ChallengeType = "proofOfPossession-01" - ChallengeDNS ChallengeType = "dns-01" + ChallengeHTTP ChalType = "http-01" + ChallengeTLS ChalType = "tls-sni-01" + ChallengePOP ChalType = "proofOfPossession-01" + ChallengeDNS ChalType = "dns-01" ) type CSR struct { -- cgit v1.2.3