Documentation
¶
Overview ¶
Copyright © 2025 KubeRocketAI Team
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2025 KubeRocketAI Team ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2025 KubeRocketAI Team ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2025 KubeRocketAI Team ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const DefaultBaseURL = "https://api.github.com"
const DefaultUserAgent = "krci-ai/v1.0.0"
Variables ¶
var DefaultTimeout = 10 * time.Second
Functions ¶
func GetFallbackMessage ¶
GetFallbackMessage returns a user-friendly error message with manual check instructions
func GetKuberocketaiFallbackMessage ¶
func GetKuberocketaiFallbackMessage() string
GetKuberocketaiFallbackMessage returns the fallback message for KubeRocketAI
func GetKuberocketaiReleasesURL ¶
func GetKuberocketaiReleasesURL() string
GetKuberocketaiReleasesURL returns the specific KubeRocketAI releases URL
func GetReleasesURL ¶
GetReleasesURL returns the GitHub releases page URL for manual checking
Types ¶
type Client ¶
Client represents a GitHub API client
func NewClientWith ¶ added in v0.26.0
NewClientWith allows constructing a client with custom parameters
func NewDefaultClient ¶ added in v0.26.0
func NewDefaultClient() *Client
NewDefaultClient returns a client configured with defaults from config.go
func (*Client) GetLatestRelease ¶
GetLatestRelease fetches the latest release for a repository
type Release ¶
type Release struct {
TagName string `json:"tag_name"`
Name string `json:"name"`
Body string `json:"body"`
HTMLURL string `json:"html_url"`
PublishedAt time.Time `json:"published_at"`
Draft bool `json:"draft"`
Prerelease bool `json:"prerelease"`
TarballURL string `json:"tarball_url"`
ZipballURL string `json:"zipball_url"`
}
Release represents a GitHub release
func (*Release) GetVersion ¶
GetVersion returns the version string, removing 'v' prefix if present
func (*Release) ToReleaseInfo ¶
func (r *Release) ToReleaseInfo() *ReleaseInfo
ToReleaseInfo converts a Release to ReleaseInfo
func (*Release) UnmarshalJSON ¶
UnmarshalJSON custom unmarshaling to handle various date formats
type ReleaseInfo ¶
type ReleaseInfo struct {
Version string `json:"version"`
TagName string `json:"tag_name"`
Name string `json:"name"`
Body string `json:"body"`
URL string `json:"url"`
PublishedAt time.Time `json:"published_at"`
IsStable bool `json:"is_stable"`
}
ReleaseInfo contains processed release information