ogp

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client ... クライアント

func NewClient

func NewClient(psCli *cloudpubsub.Client, topicName string) *Client

NewClient ... クライアントを作成する

type OpenGraph

type OpenGraph struct {
	URL         string `json:"url"`
	Title       string `json:"title"`
	Description string `json:"description"`
	ImageURL    string `json:"image_url"`
	FaviconURL  string `json:"favicon_url"`
}

OpenGraph ... OGPでよく使うもの

func Get

func Get(ctx context.Context, url string) (*OpenGraph, error)

Get ... OG情報を取得する

func GetMulti

func GetMulti(ctx context.Context, urls []string) ([]*OpenGraph, error)

GetMulti ... OG情報を複数取得する

Jump to

Keyboard shortcuts

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