func (e *Export) Revoke(pubKey string) {
	e.RevokeAt(pubKey, time.Now())
}
Revoke enters a revocation by publickey using time.Now().
package jwt
import (
	"fmt"
	"time"
)
type ResponseType string
const (
	ResponseTypeSingleton = "Singleton"
	ResponseTypeStream = "Stream"
	ResponseTypeChunked = "Chunked"
)
type ServiceLatency struct {
	Sampling int     `json:"sampling,omitempty"`
	Results  Subject `json:"results"`
}
func (sl *ServiceLatency) Validate(vr *ValidationResults) {
	if sl.Sampling < 1 || sl.Sampling > 100 {
		vr.AddError("sampling percentage needs to be between 1-100")
	}
	sl.Results.Validate(vr)
	if sl.Results.HasWildCards() {
		vr.AddError("results subject can not contain wildcards")
	}
}
type Export struct {
	Name         string          `json:"name,omitempty"`
	Subject      Subject         `json:"subject,omitempty"`
	Type         ExportType      `json:"type,omitempty"`
	TokenReq     bool            `json:"token_req,omitempty"`
	Revocations  RevocationList  `json:"revocations,omitempty"`
	ResponseType ResponseType    `json:"response_type,omitempty"`
	Latency      *ServiceLatency `json:"service_latency,omitempty"`
}
func (e *Export) IsService() bool {
	return e.Type == Service
}
func (e *Export) IsStream() bool {
	return e.Type == Stream
}
func (e *Export) IsSingleResponse() bool {
	return e.Type == Service && (e.ResponseType == ResponseTypeSingleton || e.ResponseType == "")
}
func (e *Export) IsChunkedResponse() bool {
	return e.Type == Service && e.ResponseType == ResponseTypeChunked
}
func (e *Export) IsStreamResponse() bool {
	return e.Type == Service && e.ResponseType == ResponseTypeStream
}
func (e *Export) Validate(vr *ValidationResults) {
	if !e.IsService() && !e.IsStream() {
		vr.AddError("invalid export type: %q", e.Type)
	}
	if e.IsService() && !e.IsSingleResponse() && !e.IsChunkedResponse() && !e.IsStreamResponse() {
		vr.AddError("invalid response type for service: %q", e.ResponseType)
	}
	if e.IsStream() && e.ResponseType != "" {
		vr.AddError("invalid response type for stream: %q", e.ResponseType)
	}
	if e.Latency != nil {
		if !e.IsService() {
			vr.AddError("latency tracking only permitted for services")
		}
		e.Latency.Validate(vr)
	}
	e.Subject.Validate(vr)
}