models

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	ID        string    `json:"id"`
	Title     string    `json:"title"`
	URL       string    `json:"url"`
	Scope     string    `json:"scope"`
	UpdatedAt time.Time `json:"updated_at"`
}

Notification it's the entity used to transform to JSON the notification.Notification

func NewNotifications

func NewNotifications(ns []*notification.Notification) []*Notification

NewNotifications returns a conversion of the ns to Notification

type Source

type Source struct {
	Canonical string `json:"canonical"`
	Name      string `json:"name"`
}

Source it's the JSON representation of the source.Source

func NewSources

func NewSources(src []source.Source) []Source

NewSources trasforms src to Source

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL