Documentation
¶
Index ¶
Constants ¶
View Source
const CSVContentType = "text/csv"
Variables ¶
View Source
var ErrNoContent = errors.New("no content")
Functions ¶
This section is empty.
Types ¶
type AggregatedToken ¶
type AggregatedToken struct {
Amount int64 `rql:"name=amount,type=number"`
Type string `rql:"name=type,type=string"`
Description string `rql:"name=description,type=string"`
UserID string `rql:"name=user_id,type=string"`
UserTitle string `rql:"name=user_title,type=string"`
UserAvatar string `rql:"name=user_avatar,type=string"`
CreatedAt time.Time `rql:"name=created_at,type=datetime"`
OrgID string `rql:"name=org_id,type=string"`
}
type CSVExport ¶
type CSVExport struct {
Amount string `csv:"Amount"`
Type string `csv:"Type"`
Description string `csv:"Description"`
UserID string `csv:"User ID"`
UserTitle string `csv:"User Title"`
CreatedAt string `csv:"Created At"`
OrgID string `csv:"Organization ID"`
}
CSVExport represents the structure for CSV export of organization tokens
func NewCSVExport ¶
func NewCSVExport(token AggregatedToken) CSVExport
NewCSVExport converts AggregatedToken to CSVExport
func (CSVExport) GetHeaders ¶
GetHeaders returns the CSV headers based on struct tags
type OrganizationTokens ¶
type OrganizationTokens struct {
Tokens []AggregatedToken `json:"tokens"`
Pagination Page `json:"pagination"`
}
type Repository ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repository Repository) *Service
Click to show internal directories.
Click to hide internal directories.