Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConverterTopicID string = "image-converter" 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
}
func NewClient ¶
func NewClient( cPubSub *cloudpubsub.Client, converterDstEndpoint string, converterDstAuthToken string, ) *Client
func NewClientWithOption ¶
func NewClientWithOption( cPubSub *cloudpubsub.Client, converterDstEndpoint string, converterDstAuthToken string, reqOption *ClientOption, ) *Client
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"`
DstEndpoint string `json:"dst_endpoint"`
DstEndpointAuthToken string `json:"dst_endpoint_auth_token"`
}
画像変換リクエスト
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"`
}
画像作成リクエスト
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(repo Repository) *Handler
func (*Handler) UpdateByConvertObjects ¶
func (h *Handler) UpdateByConvertObjects(w http.ResponseWriter, r *http.Request)
変換後の画像をアップデートする
func (*Handler) UpdateByGenerateURL ¶
func (h *Handler) UpdateByGenerateURL(w http.ResponseWriter, r *http.Request)
作成した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"`
}
画像オブジェクト
type Repository ¶
Click to show internal directories.
Click to hide internal directories.