Documentation
¶
Index ¶
- Constants
- Variables
- type CreateGlossaryRequest
- type CreateGlossaryResponse
- type ExportGlossaryDateFilter
- type ExportGlossaryFilter
- type ExportGlossaryLabelsFilter
- type ExportGlossaryPaging
- type ExportGlossaryRequest
- type ExportGlossaryResponse
- type ExportGlossarySorting
- type ExportGlossaryUserFilter
- type FallbackLocale
- type GetGlossaryResponse
- type Glossary
- type ImportEntryChanges
- type ImportGlossaryRequest
- type ImportGlossaryResponse
- type ImportStatusResponse
- type ImportTranslationChanges
- type ImportWarning
Constants ¶
View Source
const ( PendingImportStatus = "PENDING" InProgressImportStatus = "IN_PROGRESS" SuccessfulImportStatus = "SUCCESSFUL" FailedImportStatus = "FAILED" )
Variables ¶
View Source
var ( ErrGlossaryNotFound = errors.New("glossary not found") ErrImportNotFound = errors.New("glossary import not found") )
Functions ¶
This section is empty.
Types ¶
type CreateGlossaryRequest ¶
type CreateGlossaryRequest struct {
GlossaryName string `json:"glossaryName"`
Description string `json:"description"`
VerificationMode bool `json:"verificationMode"`
LocaleIDs []string `json:"localeIds"`
FallbackLocales []FallbackLocale `json:"fallbackLocales"`
}
CreateGlossaryRequest is the JSON body for a glossary-create call.
type CreateGlossaryResponse ¶
type CreateGlossaryResponse struct {
Code int
GlossaryUID string
AccountUID string
GlossaryName string
}
CreateGlossaryResponse is the public result of a glossary-create call.
type ExportGlossaryFilter ¶
type ExportGlossaryFilter struct {
Query string `json:"query,omitempty"`
LocaleIds []string `json:"localeIds,omitempty"`
EntryUids []string `json:"entryUids,omitempty"`
EntryState string `json:"entryState,omitempty"`
MissingTranslationLocaleId string `json:"missingTranslationLocaleId,omitempty"`
PresentTranslationLocaleId string `json:"presentTranslationLocaleId,omitempty"`
DntLocaleId string `json:"dntLocaleId,omitempty"`
ReturnFallbackTranslations bool `json:"returnFallbackTranslations,omitempty"`
Labels *ExportGlossaryLabelsFilter `json:"labels,omitempty"`
DntTermSet bool `json:"dntTermSet,omitempty"`
Created *ExportGlossaryDateFilter `json:"created,omitempty"`
LastModified *ExportGlossaryDateFilter `json:"lastModified,omitempty"`
CreatedBy *ExportGlossaryUserFilter `json:"createdBy,omitempty"`
LastModifiedBy *ExportGlossaryUserFilter `json:"lastModifiedBy,omitempty"`
Paging ExportGlossaryPaging `json:"paging"`
Sorting *ExportGlossarySorting `json:"sorting,omitempty"`
}
type ExportGlossaryLabelsFilter ¶
type ExportGlossaryLabelsFilter struct {
Type string `json:"type,omitempty"`
}
type ExportGlossaryPaging ¶
type ExportGlossaryRequest ¶
type ExportGlossaryResponse ¶
type ExportGlossarySorting ¶
type FallbackLocale ¶
type GetGlossaryResponse ¶
type GetGlossaryResponse struct {
GlossaryUID string
Name string
Description string
LocaleIDs []string
}
GetGlossaryResponse is the public representation of a single glossary.
type Glossary ¶
type Glossary interface {
Get(ctx context.Context, accountUID uid.AccountUID, glossaryUID string) (GetGlossaryResponse, error)
GetByName(ctx context.Context, accountUID uid.AccountUID, name string) (glossaries []GetGlossaryResponse, err error)
Import(ctx context.Context, accountUID uid.AccountUID, glossaryUID string, req ImportGlossaryRequest) (ImportGlossaryResponse, error)
ImportStatus(ctx context.Context, accountUID uid.AccountUID, glossaryUID, importUID string) (ImportStatusResponse, error)
ImportConfirm(ctx context.Context, accountUID uid.AccountUID, glossaryUID, importUID string) (bool, error)
Export(ctx context.Context, accountUID uid.AccountUID, glossaryUID string, req ExportGlossaryRequest) (ExportGlossaryResponse, error)
Create(ctx context.Context, accountUID uid.AccountUID, req CreateGlossaryRequest) (CreateGlossaryResponse, error)
}
Glossary defines the glossary behaviour
func NewGlossary ¶
NewGlossary returns new Glossary implementation
type ImportEntryChanges ¶
type ImportGlossaryRequest ¶
type ImportGlossaryResponse ¶
type ImportGlossaryResponse struct {
Code int
GlossaryUID string
ImportUID string
ImportStatus string
EntryChanges ImportEntryChanges
TranslationChanges []ImportTranslationChanges
Warnings []ImportWarning
}
type ImportStatusResponse ¶
type ImportWarning ¶
Click to show internal directories.
Click to hide internal directories.