Documentation ¶
Index ¶
- type CiPipelineMaterial
- type ClientRequest
- type CommitMetadataRequest
- type FetchScmChangesRequest
- type GitCommit
- type GitMaterial
- type GitProvider
- type GitSensorApiError
- type GitSensorClient
- type GitSensorClientImpl
- func (session GitSensorClientImpl) AddRepo(material []*GitMaterial) (materialRes []*GitMaterial, err error)
- func (session GitSensorClientImpl) FetchChanges(changeRequest *FetchScmChangesRequest) (materialChangeResp *MaterialChangeResp, err error)
- func (session GitSensorClientImpl) GetCommitMetadata(commitMetadataRequest *CommitMetadataRequest) (*GitCommit, error)
- func (session GitSensorClientImpl) GetHeadForPipelineMaterials(req *HeadRequest) (material []*CiPipelineMaterial, err error)
- func (session GitSensorClientImpl) RefreshGitMaterial(req *RefreshGitMaterialRequest) (refreshRes *RefreshGitMaterialResponse, err error)
- func (session GitSensorClientImpl) SaveGitProvider(provider *GitProvider) (providerRes *GitProvider, err error)
- func (session GitSensorClientImpl) SavePipelineMaterial(material []*CiPipelineMaterial) (materialRes []*CiPipelineMaterial, err error)
- func (session GitSensorClientImpl) UpdateRepo(material *GitMaterial) (materialRes *GitMaterial, err error)
- type GitSensorConfig
- type GitSensorResponse
- type HeadRequest
- type MaterialChangeResp
- type RefreshGitMaterialRequest
- type RefreshGitMaterialResponse
- type SourceType
- type StatusCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CiPipelineMaterial ¶
type ClientRequest ¶
type CommitMetadataRequest ¶
type FetchScmChangesRequest ¶
type FetchScmChangesRequest struct { PipelineMaterialId int `json:"pipelineMaterialId"` From string `json:"from"` To string `json:"to"` }
---------------
type GitMaterial ¶
type GitProvider ¶
type GitSensorApiError ¶
type GitSensorClient ¶
type GitSensorClient interface { GetHeadForPipelineMaterials(req *HeadRequest) (material []*CiPipelineMaterial, err error) FetchChanges(changeRequest *FetchScmChangesRequest) (materialChangeResp *MaterialChangeResp, err error) GetCommitMetadata(commitMetadataRequest *CommitMetadataRequest) (*GitCommit, error) SaveGitProvider(provider *GitProvider) (providerRes *GitProvider, err error) AddRepo(material []*GitMaterial) (materialRes []*GitMaterial, err error) UpdateRepo(material *GitMaterial) (materialRes *GitMaterial, err error) SavePipelineMaterial(material []*CiPipelineMaterial) (materialRes []*CiPipelineMaterial, err error) RefreshGitMaterial(req *RefreshGitMaterialRequest) (refreshRes *RefreshGitMaterialResponse, err error) }
type GitSensorClientImpl ¶
type GitSensorClientImpl struct {
// contains filtered or unexported fields
}
func NewGitSensorSession ¶
func NewGitSensorSession(config *GitSensorConfig, logger *zap.SugaredLogger) (session *GitSensorClientImpl, err error)
func (GitSensorClientImpl) AddRepo ¶
func (session GitSensorClientImpl) AddRepo(material []*GitMaterial) (materialRes []*GitMaterial, err error)
func (GitSensorClientImpl) FetchChanges ¶
func (session GitSensorClientImpl) FetchChanges(changeRequest *FetchScmChangesRequest) (materialChangeResp *MaterialChangeResp, err error)
func (GitSensorClientImpl) GetCommitMetadata ¶
func (session GitSensorClientImpl) GetCommitMetadata(commitMetadataRequest *CommitMetadataRequest) (*GitCommit, error)
func (GitSensorClientImpl) GetHeadForPipelineMaterials ¶
func (session GitSensorClientImpl) GetHeadForPipelineMaterials(req *HeadRequest) (material []*CiPipelineMaterial, err error)
func (GitSensorClientImpl) RefreshGitMaterial ¶
func (session GitSensorClientImpl) RefreshGitMaterial(req *RefreshGitMaterialRequest) (refreshRes *RefreshGitMaterialResponse, err error)
func (GitSensorClientImpl) SaveGitProvider ¶
func (session GitSensorClientImpl) SaveGitProvider(provider *GitProvider) (providerRes *GitProvider, err error)
func (GitSensorClientImpl) SavePipelineMaterial ¶
func (session GitSensorClientImpl) SavePipelineMaterial(material []*CiPipelineMaterial) (materialRes []*CiPipelineMaterial, err error)
func (GitSensorClientImpl) UpdateRepo ¶
func (session GitSensorClientImpl) UpdateRepo(material *GitMaterial) (materialRes *GitMaterial, err error)
type GitSensorConfig ¶
type GitSensorConfig struct { Url string `env:"GIT_SENSOR_URL" envDefault:"http://localhost:9999"` Timeout int `env:"GIT_SENSOR_TIMEOUT" envDefault:"0"` // in seconds }
----------------------impl
func GetGitSensorConfig ¶
func GetGitSensorConfig() (*GitSensorConfig, error)
type GitSensorResponse ¶
type GitSensorResponse struct { Code int `json:"code,omitempty"` Status string `json:"status,omitempty"` Result json.RawMessage `json:"result,omitempty"` Errors []*GitSensorApiError `json:"errors,omitempty"` }
-----------
type HeadRequest ¶
type HeadRequest struct {
MaterialIds []int `json:"materialIds"`
}
type MaterialChangeResp ¶
type RefreshGitMaterialRequest ¶
type RefreshGitMaterialRequest struct {
GitMaterialId int `json:"gitMaterialId"`
}
type SourceType ¶
type SourceType string
type StatusCode ¶
type StatusCode int
func (StatusCode) IsSuccess ¶
func (code StatusCode) IsSuccess() bool
Click to show internal directories.
Click to hide internal directories.