Documentation ¶
Index ¶
- func ClassifyDomain(domain string) chat1.UnfurlType
- func ClassifyDomainFromURI(uri string) (typ chat1.UnfurlType, domain string, err error)
- func GetDefaultFaviconURL(uri string) (string, error)
- func GetDomain(uri string) (res string, err error)
- func GetHostname(uri string) (string, error)
- func IsDomain(domain, target string) bool
- type Extractor
- type ExtractorHit
- type ExtractorHitTyp
- type Packager
- type Scraper
- type Settings
- func (s *Settings) Get(ctx context.Context) (res chat1.UnfurlSettings, err error)
- func (s *Settings) Set(ctx context.Context, settings chat1.UnfurlSettings) (err error)
- func (s *Settings) SetMode(ctx context.Context, mode chat1.UnfurlMode) (err error)
- func (s *Settings) WhitelistAdd(ctx context.Context, domain string) (err error)
- func (s *Settings) WhitelistRemove(ctx context.Context, domain string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClassifyDomain ¶
func ClassifyDomain(domain string) chat1.UnfurlType
func ClassifyDomainFromURI ¶
func ClassifyDomainFromURI(uri string) (typ chat1.UnfurlType, domain string, err error)
func GetDefaultFaviconURL ¶
func GetHostname ¶
Types ¶
type Extractor ¶
type Extractor struct { utils.DebugLabeler // contains filtered or unexported fields }
func NewExtractor ¶
type ExtractorHit ¶
type ExtractorHit struct { URL string Typ ExtractorHitTyp }
type ExtractorHitTyp ¶
type ExtractorHitTyp int
const ( ExtractorHitUnfurl ExtractorHitTyp = iota ExtractorHitPrompt )
type Packager ¶
type Packager struct { utils.DebugLabeler // contains filtered or unexported fields }
func NewPackager ¶
func NewPackager(l logger.Logger, store attachments.Store, s3signer s3.Signer, ri func() chat1.RemoteInterface) *Packager
type Settings ¶
type Settings struct { utils.DebugLabeler // contains filtered or unexported fields }
func NewSettings ¶
func NewSettings(log logger.Logger, storage types.ConversationBackedStorage) *Settings
func (*Settings) WhitelistAdd ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.