Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Code code.Code `json:"code"` Message string `json:"message"` RawLocalized *dto.Localized `json:"-"` Localized *Localized `json:"localized,omitempty"` RequestInfo *dto.RequestInfo `json:"requestInfo,omitempty"` ResourceInfo *dto.ResourceInfo `json:"resourceInfo,omitempty"` ErrorInfo *dto.ErrorInfo `json:"errorInfo,omitempty"` HelpLinks []*dto.HelpLink `json:"helpLinks,omitempty"` RawFieldViolations []*dto.FieldViolation `json:"-"` FieldViolations []*FieldViolation `json:"fieldViolations,omitempty"` PreconditionViolations []*dto.PreconditionViolation `json:"preconditionViolations,omitempty"` QuotaViolations []*dto.QuotaViolation `json:"quotaViolations,omitempty"` RetryInfo *dto.RetryInfo `json:"retryInfo,omitempty"` }
type FieldViolation ¶
type LocalizationProvider ¶
type LocalizationProvider interface { Localize(messageID string, languages []language.Tag) (msg string, tag language.Tag, notFound bool, err error) LocalizeAny(any interface{}, languages []language.Tag) (msg string, tag language.Tag, notFound bool, err error) }
LocalizationProvider is an interface for localization implementors
type RenderOption ¶
type RenderOption func(config *renderConfig)
func WithLanguages ¶
func WithLanguages(languages []language.Tag) RenderOption
func WithLocalizationProvider ¶
func WithLocalizationProvider(provider LocalizationProvider) RenderOption
func WithLogger ¶
func WithLogger(logger liblog.Logger) RenderOption
Click to show internal directories.
Click to hide internal directories.