Documentation
¶
Index ¶
- Constants
- func CreateKey(items ...string) string
- func GetKey(s string) string
- type CompleteInfo
- type Config
- type Error
- type Key
- type MetaData
- type Redis
- type Status
- type Store
- func (s *Store) CheckPrompt(ctx context.Context, prompt string) error
- func (s *Store) GetID(ctx context.Context, key string) (string, error)
- func (s *Store) GetMetaData(ctx context.Context, id string) (*MetaData, error)
- func (s *Store) GetType(ctx context.Context, key string) (isQuadrilateralGrid, mjType string, err error)
- func (s *Store) SaveMeta(ctx context.Context, key, id, typ, prompt string, status Status, ...) error
- func (s *Store) SaveWebhook(ctx context.Context, id, webhook, reqId, memberId string) error
- func (s *Store) SaveWithComplete(ctx context.Context, ...) error
- func (s *Store) UpdateProcessRate(ctx context.Context, id, processRate string, attachments string, ...) error
- type Type
Constants ¶
View Source
const ( StatusWaitingToStart Status = "Waiting to start" StatusJobQueued Status = "Job queued" StatusProcessing Status = "Processing" StatusComplete Status = "Complete" StatusUnknown Status = "Unknown" IsQuadrilateralGrid = "0" NotQuadrilateralGrid = "1" TypeImagine = "Imagine" TypeUpscale = "Upscale" TypeUpscaleXTwo = "UpscaleXTwo" TypeReroll = "Reroll" TypeUpscaleXFour = "UpscaleXFour" TypeVariation = "Variation" TypeVariationStrong = "VariationStrong" TypeVariationSubtle = "VariationSubtle" TypeVariationRegion = "VariationRegion" TypePanUp = "PanUp" TypePanRight = "PanRight" TypePanLeft = "PanLeft" TypePanDown = "PanDown" TypePicReader = "PicReader" TypeZoomOutOneX = "ZoomOutOneX" TypeZoomOutTwoX = "ZoomOutTwoX" TypeUnknown = "Unknown" TypeUpscaleKey = "Upscale" TypeUpscaleXFourKey = "UpscaleXFour" TypeUpscaleXTwoKey = "UpscaleXTwo" TypeVariationKey = "Variation" TypeVariationStrongKey = "VariationStrong" TypeVariationSubtleKey = "VariationSubtle" TypeVariationRegionKey = "VariationRegion" TypeRerollKey = "Reroll" PanTypeUpKey = "PanUp" PanTypeRightKey = "PanRight" PanTypeLeftKey = "PanLeft" PanTypeDownKey = "PanDown" TypePicReaderKey = "PicReader" TypeZoomOutOneXKey = "ZoomOutOneX" TypeZoomOutTwoXKey = "ZoomOutTwoX" PanParamUp = "pan_up" PanParamRight = "pan_right" PanParamLeft = "pan_left" PanParamDown = "pan_down" DrmMidjourneyCaptcha = `drm:midjourney_server` Expired time.Duration = 3 * 24 * time.Hour ImageStart = `\*\*(.*?)\*\* - <@\d+> \((.*?)\)` UpscaleRun = `\*\*(.*?)\*\* - Image #(\d+) <@\d+>` UpscaleStart = `Upscaling image #(\d+)` UpscaleMultipleStart = `\*\*(.*?)\*\* - Upscaled \((.*?)\) by <@\d+> \((.*?)\)` VariationRun = `\*\*(.*?)\*\* - Variations by <@\d+> \((.*?)\)` VariationStart = `Making variations for image #(\d+)` )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CompleteInfo ¶
type MetaData ¶
type MetaData struct { ID string `redis:"id"` Prompt string `redis:"prompt"` Type string `redis:"type"` Status Status `redis:"status"` ProcessRate string `redis:"process_rate"` Attachments string `redis:"attachments"` StartTime int64 `redis:"start_time"` CompleteTime int64 `redis:"complete_time"` Webhook string `redis:"webhook"` CompleteMessageID string `redis:"complete_message_id"` Mode string `redis:"mode"` RequestId string `redis:"request_id"` IsQuadrilateralGrid string `redis:"is_quadrilateral_grid"` MemberId string `redis:"member_id"` }
func (*MetaData) GetImageURL ¶
type Store ¶
type Store struct {
*redis.Client
}
func (*Store) GetMetaData ¶
func (*Store) GetType ¶ added in v0.0.4
func (s *Store) GetType(ctx context.Context, key string) (isQuadrilateralGrid, mjType string, err error)
通过referenced_message_id反向查询对应的类型
func (*Store) SaveWebhook ¶
func (*Store) SaveWithComplete ¶
Click to show internal directories.
Click to hide internal directories.