Documentation
¶
Index ¶
- Constants
- type Author
- type ClientRequest
- type Commit
- type Committer
- type FileStat
- type FileStats
- type GitChanges
- type GitSensorApiError
- type GitSensorClient
- type GitSensorClientImpl
- type GitSensorConfig
- type GitSensorGrpcClient
- type GitSensorGrpcClientConfig
- type GitSensorGrpcClientImpl
- type GitSensorResponse
- type Hash
- type ReleaseChangesRequest
- type StatusCode
- type Tag
- type Tree
Constants ¶
View Source
const (
ContextTimeoutInSeconds = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientRequest ¶
type Commit ¶
type Commit struct { Hash *Hash Tree *Tree Author *Author Committer *Committer Tag *Tag Subject string Body string }
Commit data
type GitChanges ¶
type GitSensorApiError ¶
type GitSensorClient ¶
type GitSensorClient interface {
GetReleaseChanges(request *ReleaseChangesRequest) (*GitChanges, 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) GetReleaseChanges ¶
func (session GitSensorClientImpl) GetReleaseChanges(req *ReleaseChangesRequest) (changes *GitChanges, 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 GitSensorGrpcClient ¶
type GitSensorGrpcClient interface {
GetChangesInRelease(ctx context.Context, req *pb.ReleaseChangeRequest) (*GitChanges, error)
}
type GitSensorGrpcClientConfig ¶
type GitSensorGrpcClientConfig struct {
Url string `env:"GIT_SENSOR_URL" envDefault:"127.0.0.1:7070"`
}
func GetConfig ¶
func GetConfig() (*GitSensorGrpcClientConfig, error)
GetConfig parses and returns GitSensor gRPC client configuration
type GitSensorGrpcClientImpl ¶
type GitSensorGrpcClientImpl struct {
// contains filtered or unexported fields
}
func NewGitSensorGrpcClientImpl ¶
func NewGitSensorGrpcClientImpl(logger *zap.SugaredLogger, config *GitSensorGrpcClientConfig) *GitSensorGrpcClientImpl
func (*GitSensorGrpcClientImpl) GetChangesInRelease ¶
func (client *GitSensorGrpcClientImpl) GetChangesInRelease(ctx context.Context, req *pb.ReleaseChangeRequest) ( *GitChanges, 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 ReleaseChangesRequest ¶
type StatusCode ¶
type StatusCode int
func (StatusCode) IsSuccess ¶
func (code StatusCode) IsSuccess() bool
Click to show internal directories.
Click to hide internal directories.