Documentation
¶
Index ¶
Constants ¶
const ( // ConverterTopicID ... 画像変換のPubSubトピックID ConverterTopicID string = "image-converter" // GeneratorTopicID ... 画像作成のPubSubトピックID GeneratorTopicID string = "image-generator" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ... クライアント
func NewClientWithOption ¶
func NewClientWithOption(psCli *cloudpubsub.Client, reqOption *ClientOption) *Client
NewClientWithOption ... オプションを指定してクライアントを作成する
type ClientOption ¶
type ConvertRequest ¶
type ConvertRequest struct {
Key string `json:"key"`
SourceID string `json:"source_id"`
SourceURLs []string `json:"source_urls"`
DstFilePath string `json:"dst_file_path"`
}
ConvertRequest ... 画像変換リクエスト
type GenerateRequest ¶
type GenerateRequest struct {
Key string `json:"key"`
SourceID string `json:"source_id"`
SourceURL string `json:"source_url"`
Width int `json:"width"`
Height int `json:"height"`
DstFilePath string `json:"dst_file_path"`
}
GenerateRequest ... 画像作成リクエスト
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler ... スポットのハンドラ
func (*Handler) UpdateByConvertObjects ¶
func (h *Handler) UpdateByConvertObjects(w http.ResponseWriter, r *http.Request)
UpdateByConvertObjects ... 変換後の画像をアップデートする
func (*Handler) UpdateByGenerateURL ¶
func (h *Handler) UpdateByGenerateURL(w http.ResponseWriter, r *http.Request)
UpdateByGenerateURL ... 作成したOGPをアップデートする
type Object ¶
type Object struct {
ID string `firestore:"id" json:"id"`
OriginalURL string `firestore:"original_url" json:"original_url"`
URL string `firestore:"url" json:"url"`
Filename string `firestore:"filename" json:"filename"`
ContentType string `firestore:"content_type" json:"content_type"`
DominantColor string `firestore:"dominant_color" json:"dominant_color"`
Sizes map[string]*Size `firestore:"sizes" json:"sizes"`
IsDefault bool `firestore:"is_default" json:"is_default"`
}
Object ... 画像オブジェクト