Documentation
¶
Index ¶
- Constants
- Variables
- func DayEndTime(t carbon.Carbon) time.Time
- func DayEndUnix(t carbon.Carbon) int64
- func DayEndUnixMilli(t carbon.Carbon) int64
- func DayEndUnixRFC3339(t carbon.Carbon) string
- func DayStartTime(t carbon.Carbon) time.Time
- func DayStartUnix(t carbon.Carbon) int64
- func DayStartUnixMilli(t carbon.Carbon) int64
- func DayStartUnixRFC3339(t carbon.Carbon) string
- func GetClient(cfg *types.AIConfig) (ai.Generative, error)
- func GetEnv(envstr string, fallback ...string) string
- func GetVersionWithHash() string
- func GitImage() string
- func NewDeepSeek(cfg *types.AIConfig) (*openai.Client, error)
- func NewOpenAI(cfg *types.AIConfig) (*openai.Client, error)
- func PlaceholderImage() string
- type ErrWrongURLFormat
- type GitURL
Constants ¶
View Source
const ( // DefaultPipelineExecutionCreatedUnix is the default unix timestamp for pipeline execution creation time. 2024-03-01 00:00:00 DefaultPipelineExecutionCreatedUnix int64 = 1709222400000 // DefaultGitImage is the default git image DefaultGitImage = "hub.zentao.net/ci/gitfox-plugin-git:2.0" // DefaultPlaceholderImage is the default placeholder image DefaultPlaceholderImage = "hub.zentao.net/ci/gitfox-plugin-placeholder:1" )
Variables ¶
View Source
var ( Version string BuildDate string GitCommitHash string GitBranch string )
Functions ¶
func DayEndUnixRFC3339 ¶
func DayEndUnixRFC3339(t carbon.Carbon) string
DayEndUnixRFC3339 获取一天的结束时间 格式化
func DayStartUnixMilli ¶
func DayStartUnixMilli(t carbon.Carbon) int64
DayStartUnixMilli 获取一天的开始时间 毫秒
func DayStartUnixRFC3339 ¶
func DayStartUnixRFC3339(t carbon.Carbon) string
DayStartUnixRFC3339 获取一天的开始时间 格式化 2025-01-01T00:00:00Z
func GetClient ¶
func GetClient(cfg *types.AIConfig) (ai.Generative, error)
GetClient returns the generative client based on the platform
func GetVersionWithHash ¶
func GetVersionWithHash() string
GetVersionWithHash returns the version string with the git commit hash and build date.
func PlaceholderImage ¶
func PlaceholderImage() string
Types ¶
type ErrWrongURLFormat ¶
type ErrWrongURLFormat struct {
URL string
}
ErrWrongURLFormat represents an error with wrong url format
func (ErrWrongURLFormat) Error ¶
func (err ErrWrongURLFormat) Error() string
Click to show internal directories.
Click to hide internal directories.