repository

package
v0.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

*

  • Created by GoLand.
  • Email: xzghua@gmail.com
  • Date: 2019-07-17
  • Time: 15:07

*

  • Created by GoLand.
  • User: zghua
  • Email: xzghua@gmail.com
  • Date: 2019-06-25
  • Time: 21:10

*

  • Created by GoLand.
  • User: zghua
  • Email: xzghua@gmail.com
  • Date: 2019-06-24
  • Time: 17:43

*

  • Created by GoLand.
  • User: zghua
  • Email: xzghua@gmail.com
  • Date: 2019-06-25
  • Time: 21:10

Index

Constants

View Source
const (
	Building      = "BUILDING"
	BuildSuccess  = "SUCCESS"
	BuildFailure  = "FAILURE"
	BuildAborted  = "ABORTED"
	BuildRoolback = "ROLLBACK"
	NoBuild       = "NOBUILD"
)
View Source
const (
	AppTarget    = "app"
	GlobalTarget = "global"
)

Variables

View Source
var (
	ErrProjectIdIsNull = errors.New("项目id不能为空")
	ErrKindNull        = errors.New("项目Kind不能为空")
)

Functions

This section is empty.

Types

type AuditState

type AuditState int
const (
	AuditUnsubmit AuditState = iota // 未提交
	AuditSubmit                     // 提交
	AuditFail                       // 审核失败
	AuditPass                       // 审核成功

)

type BuildRepository

type BuildRepository interface {
	FirstByTag(ns, name, version string) (res *types.Build, err error)
	FindBuildByBuildId(ns, name string, buildId int) (res types.Build, err error)
	FindById(ns, name string, id int64) (res types.Build, err error)
	CreateBuild(rep *types.Build) (*types.Build, error)
	Update(b *types.Build) error
	FindOffsetLimit(ns, name string, offset, limit int) (res []*types.Build, err error)
	Count(ns, name string) (count int64, err error)
	FindStatisticsOffsetLimit(req StatisticsRequest, offset, limit int) (res []*types.Build, err error)
	CountStatistics(req StatisticsRequest) (count int64, err error)
	GetGroupByBuilds(req StatisticsRequest, groupBy string) (ress []Ress, err error)
	Delete(ns, name string) error
	CountByStatus(ns, name, buildStatus string) (total int64, err error)
}

func NewBuildRepository

func NewBuildRepository(db *gorm.DB) BuildRepository

type CasbinRepository

type CasbinRepository interface {
	AddCasbin(r *types.Casbin) bool
}

func NewCasbin

func NewCasbin(db *gorm.DB) CasbinRepository

type ConfigDataRepository

type ConfigDataRepository interface {
	Create(confMap *types.ConfigData) error
	Update(id int64, valu, path string) error
	Find(ns, name string) (list []*types.ConfigData, err error)
	Delete(configMapId int64) error
	FindByConfMapId(configMapId int64) (re *types.ConfigData, err error)
	FindByConfMapIdAndKey(configMapId int64, key string) (re *types.ConfigData, notFound bool)
	FindById(id int64) (re *types.ConfigData, err error)
	Count(configMapId int64) (count int, err error)
	FindOffsetLimit(configMapId int64, offset, limit int) (res []*types.ConfigData, err error)
	DeleteById(id int64) error
}

func NewConfigDataRepository

func NewConfigDataRepository(db *gorm.DB) ConfigDataRepository

type ConfigEnvRepository

type ConfigEnvRepository interface {
	GetConfigEnvByNameNs(name, namespace string) ([]*types.ConfigEnv, error)
	GetConfigEnvCountByNameNs(name, ns string) (cnt int64, err error)
	GetConfigEnvPaginate(name, ns string, offset int, limit int) ([]types.ConfigEnv, error)
	CreateConfEnv(name, ns, envKey, envVar, EnvDesc string) error
	FindById(id int64) (types.ConfigEnv, bool)
	Update(id int64, confEnv types.ConfigEnv) error
	Delete(id int64) error
}

func NewConfigEnvRepository

func NewConfigEnvRepository(db *gorm.DB) ConfigEnvRepository

type ConfigMapRepository

type ConfigMapRepository interface {
	Create(confMap *types.ConfigMap) (rs *types.ConfigMap, err error)
	Find(ns, name string) (*types.ConfigMap, bool)
	FindById(id int64) (*types.ConfigMap, bool)
	Count(ns, name string) (count int, err error)
	FindOffsetLimit(ns, name string, offset, limit int) (res []*types.ConfigMap, err error)
	Update(ns, name, desc string) error
	Delete(id int64) error
	DeleteByNsName(ns, name string) error
}

func NewConfigMapRepository

func NewConfigMapRepository(db *gorm.DB) ConfigMapRepository

type ConsulRepository

type ConsulRepository interface {
	Find(ns, name string) (*types.Consul, bool)
	FirstOrCreate(entry *api.ACLEntry, ns, name string) (consul *types.Consul, err error)
	UpdateOrCreate(entry *api.ACLEntry, ns, name string) (err error)
	Count(ns, name string) (count int, err error)
	FindOffsetLimit(ns, name string, offset, limit int) (res []*types.Consul, err error)
	Delete(ns, name string) error
}

func NewConsulReporitory

func NewConsulReporitory(db *gorm.DB) ConsulRepository

type CronjobRepository

type CronjobRepository interface {
	Create(*types.Cronjob) (*types.Cronjob, error)
	Find(cId int64) (*types.Cronjob, error)
	Update(cj *types.Cronjob, id int64) error
	Delete(id int64) error
	GetCronjobByNs(ns string) ([]*types.Cronjob, error)
	GetCronjobByNameLikeAndNs(nameLike string, ns string) ([]*types.Cronjob, error)
	GetCronJobByNameAndNs(name string, ns string) (*types.Cronjob, bool)
	CronJobCountWithGroup(name string, ns string, group int64) (int64, error)
	CronJobPaginateWithGroup(name string, ns string, group int64, offset int, limit int) ([]*types.Cronjob, error)
}

func NewCronjobRepository

func NewCronjobRepository(db *gorm.DB) CronjobRepository

type DockerfileRepository

type DockerfileRepository interface {
	Create(data *types.Dockerfile) error
	FindById(id int64) (res *types.Dockerfile, err error)
	Update(data *types.Dockerfile) (err error)
	Delete(id int64) (err error)
	FindBy(language []string, status int, name string, offset, limit int) (res []*types.Dockerfile, count int64, err error)
}

func NewDockerfileRepository

func NewDockerfileRepository(db *gorm.DB) DockerfileRepository

type EventHistoryRepository

type EventHistoryRepository interface {
	Create(history *types.EventHistory) error
}

func NewEventHistoryRepository

func NewEventHistoryRepository(db *gorm.DB) EventHistoryRepository

type EventRepository

type EventRepository interface {
	FindByIds(ids []int) (list []*types.Event, err error)
	FindAllEvents() (list []*types.Event, err error)
	FindByKind(kind EventsKind) (res *types.Event, err error)
}

func NewEventRepository

func NewEventRepository(db *gorm.DB) EventRepository

type EventsKind

type EventsKind string
const (
	BuildEvent     EventsKind = "Build"
	ApplyEvent     EventsKind = "Apply"
	AuditEvent     EventsKind = "Audit"
	DeleteEvent    EventsKind = "Delete"
	MemberEvent    EventsKind = "Member"
	RollbackEvent  EventsKind = "Rollback"
	LoggingEvent   EventsKind = "Logging"
	RebootEvent    EventsKind = "Reboot"
	CommandEvent   EventsKind = "Command"
	StorageEvent   EventsKind = "Storage"
	IngressGateway EventsKind = "Gateway"
	Expansion      EventsKind = "Expansion"      //扩容
	Extend         EventsKind = "Extend"         //伸缩
	SwitchModel    EventsKind = "SwitchModel"    //调整服务模式
	ReadinessProbe EventsKind = "ReadinessProbe" //修改探针
	TestEvent      EventsKind = "Test"
	VolumeConfig   EventsKind = "VolumeConfig"
	VolumeHosts    EventsKind = "VolumeHosts"
)

func (EventsKind) String

func (c EventsKind) String() string

type GroupsRepository

type GroupsRepository interface {
	Create(g *types.Groups) error
	Find(id int64) (*types.Groups, error)
	GroupExistsById(id int64) (*types.Groups, bool)
	CreateGroupAndRelation(g *types.Groups, member *types.Member) error
	GetGroupByName(name string) (*types.Groups, error)
	GroupExistsByName(name string) (*types.Groups, bool)
	GetGroupByDisplayName(displayName string) (*types.Groups, error)
	GroupExistsByDisplayName(displayName string) (*types.Groups, bool)
	GroupDisplayNameExists(displayName string, id int64) (*types.Groups, bool)
	GroupNameExists(name string, id int64) (*types.Groups, bool)
	AllGroupsCount(displayName string, ns string) (int64, error)
	GroupsPaginate(displayName string, ns string, offset int, limit int) ([]types.Groups, error)
	UpdateGroup(g *types.Groups, groupId int64) error
	UpdateGroupAndRelation(g *types.Groups, groupId int64, member *types.Member) error
	DestroyAndRelation(group *types.Groups) error
	GroupAddProject(group *types.Groups, project *types.Project) error
	GroupDelProject(group *types.Groups, project *types.Project) error
	GroupAddCronjob(group *types.Groups, cronjob *types.Cronjob) error
	GroupDelCronjob(group *types.Groups, cronjob *types.Cronjob) error
	GroupAddMember(group *types.Groups, member *types.Member) error
	GroupDelMember(group *types.Groups, member *types.Member) error
	UserMyGroupList(name string, ns string, memberId int64, isAdmin bool) ([]*types.Groups, error)
	RelDetail(groupId int64) (*types.Groups, error)
	IsInGroup(groupId int64, memberId int64) (bool, error)
	CheckPermissionForMidCronJob(cronJobId int64, groupIds []int64) (notFound bool, err error)
	CheckPermissionForMidProject(projectId int64, groupIds []int64) (notFound bool, err error)
	GetMemberIdsByProjectNameAndNs(pName, pNs string) (members []types.Member)
	GetIndexProjectByMemberIdAndNs(memberId int64, ns string) (projectLists []*types.Project, err error)
	GroupNameIsExists(name string) (notFound bool)
	GroupDisplayNameIsExists(displayName string) (notFound bool)
}

func NewGroupsRepository

func NewGroupsRepository(db *gorm.DB) GroupsRepository

type Kind

type Kind string
const (
	Deployment     Kind = "Deployment"
	Service        Kind = "Service"
	VirtualService Kind = "VirtualService"
	Ingress        Kind = "Ingress"
	ConfigMap      Kind = "ConfigMap"

	FieldMesh   = "mesh"
	FieldNormal = "normal"
)

func (Kind) String

func (c Kind) String() string

type Language

type Language string
const (
	Java   Language = "Java"
	Golang Language = "Golang"
	NodeJS Language = "NodeJS"
	Python Language = "Python"
)

func (Language) String

func (c Language) String() string

type LanguageCount

type LanguageCount struct {
	Language string `json:"language"`
	Total    int64  `json:"number"`
}

type MemberRepository

type MemberRepository interface {
	Find(email string) (res *types.Member, err error)
	Login(email, password string) (*types.Member, error)
	Create(username, email, password string) error
	Update(param *types.Member) error
	GetInfoById(id int64) (member *types.Member, err error)
	GetMembers(emailLike string, nsName string) (members []types.Member, err error)
	FindById(mId int64) (*types.Member, error)
	GetNssByMemberId(mId int64) ([]string, error)
	GetRolesByMemberId(mId int64) ([]*types.Role, error)
	BindWechat(email, openid string) error
	UnBindWechat(mId int64) error
	GetMembersByIds(ids []int64) (members []*types.Member, err error)
	GetMembersByNss(nss []string) (members []types.Member, err error)
	GetMembersByEmails(emails []string) (members []types.Member, err error)
	GetMembersAll() (members []types.Member, err error)
	CreateMember(m *types.Member) error
	UpdateMember(m *types.Member) error
	FindOffsetLimit(offset, limit int, email string) (res []*types.Member, err error)
	Count(email string) (int64, error)
}

func NewMemberRepository

func NewMemberRepository(db *gorm.DB) MemberRepository

type MyNotice

type MyNotice struct {
	Id              int       `json:"id"`
	Title           string    `json:"title"`
	Type            int       `json:"type"`
	Action          string    `json:"action"`
	Content         string    `json:"content"`
	Name            string    `json:"name"`
	Namespace       string    `json:"namespace"`
	MemberId        int64     `json:"member_id"`
	IsRead          int       `json:"is_read"`
	ProclaimType    string    `json:"proclaim_type"`
	ProclaimReceive string    `json:"proclaim_receive"`
	CreatedAt       null.Time `json:"created_at"`
}

type NamespaceRepository

type NamespaceRepository interface {
	Find(name string) (res *types.Namespace, err error)
	Create(ns *types.Namespace) error
	UserMyNsList(memberId int64) ([]types.Namespace, error)
	FindByNames(names []string) (res []*types.Namespace, err error)
	FindAll() (res []*types.Namespace, err error)
}

func NewNamespaceRepository

func NewNamespaceRepository(db *gorm.DB) NamespaceRepository

type NoticeMemberRepository

type NoticeMemberRepository interface {
	Create(nm *types.NoticeMember) error
	HasRead(noticeId int64) error
	CountMessage(param map[string]string, memberId int64) (count int, err error)
	FindMessageLimit(param map[string]string, memberId int64, offset, limit int) (res []*MyNotice, err error)
	CountRead(param map[string]string, memberId int64) (count int, err error)
	InsertMulti(nml []*types.NoticeMember) (num int, err error)
	ClearAll(noticeType int, memberId int64) (err error)
	Detail(noticeMemberId int, memberId int64) (res *MyNotice, err error)
}

func NewNoticeMemberRepository

func NewNoticeMemberRepository(db *gorm.DB) NoticeMemberRepository

type NoticeReceiveRepository

type NoticeReceiveRepository interface {
	Create(nr *types.NoticeReceive) error
	Update(nr *types.NoticeReceive) error
	FindListByMid(memberId int64) (list []*types.NoticeReceive, err error)
	GetNoticeReceiveByMidAction(memberId int64, action string) (nr *types.NoticeReceive, err error)
	GetNoticeReceiveByAction(action string) (nr []*types.NoticeReceive, err error)
}

func NewNoticeReceiveRepository

func NewNoticeReceiveRepository(db *gorm.DB) NoticeReceiveRepository

type NoticesRepository

type NoticesRepository interface {
	FindById(id int) (v *types.Notices, err error)
	Create(n *types.Notices) error
	CreateReturnId(n *types.Notices) int64
	Count(name string, noticeType int) (count int, err error)
	FindOffsetLimit(name string, noticeType int, offset, limit int) (res []*types.Notices, err error)
	CountByAction(ns, name string, action types.NoticeAction) (total int64, err error)
}

func NewNoticesRepository

func NewNoticesRepository(db *gorm.DB) NoticesRepository

type PermissionRepository

type PermissionRepository interface {
	FindById(id int64) (*types.Permission, error)
	FindAll() ([]*types.Permission, error)
	Delete(id int64) error
	Create(p *types.Permission) error
	Update(p *types.Permission) error
	FindByPathAndMethod(path, method string) (*types.Permission, error)
	FindByPerm(perm []string) ([]*types.Permission, error)
	FindMenus() (res []*types.Permission, err error)
	FindByIds(ids []int64) (res []*types.Permission, err error)
}

func NewPermissionRepository

func NewPermissionRepository(db *gorm.DB) PermissionRepository

type PersistentVolumeReclaimPolicy

type PersistentVolumeReclaimPolicy string
const (
	// PersistentVolumeReclaimRecycle means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim.
	// The volume plugin must support Recycling.
	PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "Recycle"
	// PersistentVolumeReclaimDelete means the volume will be deleted from Kubernetes on release from its claim.
	// The volume plugin must support Deletion.
	PersistentVolumeReclaimDelete PersistentVolumeReclaimPolicy = "Delete"
	// PersistentVolumeReclaimRetain means the volume will be left in its current phase (Released) for manual reclamation by the administrator.
	// The default policy is Retain.
	PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
)

func (PersistentVolumeReclaimPolicy) String

type ProjectJenkinsRepository

type ProjectJenkinsRepository interface {
	CreateOrUpdate(projectJenkins *types.ProjectJenkins) error
	Find(ns, name string) (res *types.ProjectJenkins, err error)
	Delete(ns, name string) error
}

func NewProjectJenkins

func NewProjectJenkins(db *gorm.DB) ProjectJenkinsRepository

type ProjectRepository

type ProjectRepository interface {
	Create(p *types.Project) error
	Find(pId int64) (*types.Project, error)
	FindByNsName(ns, name string) (res *types.Project, err error)
	FindByNsNameOnly(ns, name string) (res *types.Project, err error)
	FindByNsNameExist(ns, name string) (res *types.Project, notExist bool)
	GetProjectByNs(ns string) (res []*types.Project, err error)
	GetProjectAndTemplateByNs(ns string, name string, offset, limit int) (res []*types.Project, count int64, err error)
	GetProjectByNameLikeAndNs(nameLike string, ns string) (res []*types.Project, err error)
	GetProjectByMid(mid int64) (res []*types.Project, err error)
	GetProjectByGroupId(gid int64) (res []*types.Project, err error)
	GetProjectByMidAndNs(mid int64, ns string) (res []*types.Project, err error)
	Update(project *types.Project) error
	CountLanguage() (languageCount []*LanguageCount, err error)
	UpdateProjectById(project *types.Project) error
	Delete(ns, name string) error
	//Count(name string)
	GetProjectByGroupAndPNsAndPName(pName, pNs string, groupId int64, offset, limit int) (projects []*types.Project, count int64, err error)
	GetProjectByNsLimit(ns string) (res []*types.Project, err error)
}

func NewProjectRepository

func NewProjectRepository(db *gorm.DB) ProjectRepository

type ProjectTemplateRepository

type ProjectTemplateRepository interface {
	Create(projectTemplate *types.ProjectTemplate) error
	FirstOrCreate(projectId int64, kind Kind, fields string, finalYaml string, state int64) (res *types.ProjectTemplate, err error)
	FindByProjectId(projectId int64, kind Kind) (res *types.ProjectTemplate, err error)
	UpdateTemplate(projectTpl *types.ProjectTemplate) error
	CreateOrUpdate(projectTpl *types.ProjectTemplate) error
	FindProjectTemplateByProjectId(projectId int64) (res []*types.ProjectTemplate, err error)
	Count(namespace string, kind Kind) (count int, err error)
	FindOffsetLimit(namespace string, kind Kind, offset, limit int) (res []*types.ProjectTemplate, err error)
	Delete(projectId int64, kind Kind) error
	DeleteByProjectId(projectId int64) error
	UpdateFieldsByNsProjectId(projectId int64, kind Kind, fields, finalTpl string) error
	UpdateProjectTemplate(tpl *types.ProjectTemplate) error
	UpdateState(projectTpl *types.ProjectTemplate) error
}

func NewProjectTemplateRepository

func NewProjectTemplateRepository(db *gorm.DB) ProjectTemplateRepository

type PublishState

type PublishState int
const (
	PublishUnSubmit PublishState = iota // 未发布
	PublishPass                         // 发布成功
	PublishFail                         // 发布失败
)

type PvcRepository

type PvcRepository interface {
	Find(ns, name string) (rs *types.PersistentVolumeClaim, err error)
	FindBy(ns string, offset, limit int) (res []*types.PersistentVolumeClaim, err error)
	Count(ns string) (int64, error)
	Delete(ns, name string) (err error)
	FindAll() (res []*types.PersistentVolumeClaim, err error)
	FirstOrCreate(ns, name, accessModes, storage, storageClassName, detail, selector string, labels map[string]string) error
}

func NewPvcRepository

func NewPvcRepository(db *gorm.DB) PvcRepository

type Repository

type Repository interface {
	Build() BuildRepository
	Notice() NoticesRepository
	Proclaim() NoticesRepository
	NoticeReceive() NoticeReceiveRepository
	Namespace() NamespaceRepository
	Member() MemberRepository
	Template() TemplateRepository
	Groups() GroupsRepository
	StorageClass() StorageClassRepository
	Pvc() PvcRepository
	Project() ProjectRepository
	ProjectTemplate() ProjectTemplateRepository
	Webhook() WebhookRepository
	Event() EventRepository
	EventHistory() EventHistoryRepository
	CronJob() CronjobRepository
	ConfigMap() ConfigMapRepository
	ConfigData() ConfigDataRepository
	WechatUser() WechatUserRepository
	Permission() PermissionRepository
	Role() RoleRepository
	ProjectJenkins() ProjectJenkinsRepository
	Consul() ConsulRepository
	Dockerfile() DockerfileRepository
	NoticeMember() NoticeMemberRepository
	ConfigEnv() ConfigEnvRepository
}

func NewRepository

func NewRepository(db *gorm.DB) Repository

type Ress

type Ress struct {
	types.Build
	Count int
}

type RoleRepository

type RoleRepository interface {
	FindByIds(ids []int64) (res []*types.Role, err error)
	FindById(id int64) (*types.Role, error)
	FindPermission(id int64) (*types.Role, error)
	AddRolePermission(role *types.Role, permission ...*types.Permission) error
	Create(role *types.Role) error
	Update(role *types.Role) error
	FindAll() (roles []*types.Role, err error)
	Delete(id int64) error
	DeletePermission(role *types.Role) error
}

func NewRoleRepository

func NewRoleRepository(db *gorm.DB) RoleRepository

type StatisticsRequest

type StatisticsRequest struct {
	Namespace   string
	Name        string
	ProjectName []string
	STime       string
	ETime       string
	BuildID     int
	GitType     string
}

type StorageClassRepository

type StorageClassRepository interface {
	Find(name string) (res *types.StorageClass, err error)
	FirstOrCreate(name, provisioner string, reclaimPolicy PersistentVolumeReclaimPolicy, volumeBindingMode VolumeBindingMode, detail []byte) error
	Create(storage *types.StorageClass) error
	Delete(name string) error
	FindOffsetLimit(offset, limit int) (res []*types.StorageClass, err error)
}

func NewStorageClassRepository

func NewStorageClassRepository(db *gorm.DB) StorageClassRepository

type TemplateRepository

type TemplateRepository interface {
	Create(name, kind, detail string) error
	Update(id int, name, kind, detail string) error
	FindById(id int) (v *types.Template, err error)
	FindByKindType(kind TplKind) (v *types.Template, err error)
	DeleteById(id int) error
	Count(name string) (count int, err error)
	FindOffsetLimit(name string, offset, limit int) (res []*types.Template, err error)
	GetTemplateByKind(kind string) (*types.Template, error)
}

func NewTemplateRepository

func NewTemplateRepository(db *gorm.DB) TemplateRepository

type TplKind

type TplKind string
const (
	FilebeatConfigMap         TplKind = "FilebeatConfigMap"
	FilebeatContainer         TplKind = "FilebeatContainer"
	ConfigMapKind             TplKind = "ConfigMap"
	StorageClassKind          TplKind = "StorageClass"
	GolangJenkinsKind         TplKind = "GolangJenkins"
	JenkinsCommand            TplKind = "JenkinsCommand"
	PythonKind                TplKind = "Python"
	RegcredSecretKind         TplKind = "RegcredSecret"
	JenkinsNodeCommandKind    TplKind = "JenkinsNodeCommand"
	InitContainersKind        TplKind = "InitContainers"
	IstioProxyKind            TplKind = "IstioProxy"
	ServiceKind               TplKind = "Service"
	DeploymentKind            TplKind = "Deployment"
	DeploymentNoConfigMap     TplKind = "DeploymentNoConfigMap"
	EndpointsKind             TplKind = "Endpoints"
	ServiceEntryKind          TplKind = "ServiceEntry"
	VirtualServiceKind        TplKind = "VirtualService"
	GatewayKind               TplKind = "Gateway"
	GatewayGrpcKind           TplKind = "GatewayGrpc"
	CronJobKind               TplKind = "CronJob"
	PersistentVolumeClaimKind TplKind = "PersistentVolumeClaim"
	IngressKind               TplKind = "Ingress"
	RedisClusterStatefulSet   TplKind = "RedisClusterStatefulSet"
	RedisClusterConfigMap     TplKind = "RedisClusterConfigMap"
	ZookeeperStatefulSet      TplKind = "ZookeeperStatefulSet"
	ZookeeperConfigMap        TplKind = "ZookeeperConfigMap"
	RocketMqStatefulSet       TplKind = "RocketMqStatefulSet"
	RabbitMqStatefulSet       TplKind = "RabbitMqStatefulSet"
	MysqlStatefulSet          TplKind = "MysqlStatefulSet"
	JenkinsJavaCommand        TplKind = "JenkinsJavaCommand"
	NewVirtualService         TplKind = "NewVirtualService"
	InitVirtualService        TplKind = "InitVirtualService"
	InitIngress               TplKind = "InitIngress"
	EmailAlarm                TplKind = "EmailAlarm"
	EmailNotice               TplKind = "EmailNotice"
	EmailProclaim             TplKind = "EmailProclaim"
)

func (TplKind) ToString

func (c TplKind) ToString() string

type VolumeBindingMode

type VolumeBindingMode string
const (
	// VolumeBindingImmediate indicates that PersistentVolumeClaims should be
	// immediately provisioned and bound.  This is the default mode.
	VolumeBindingImmediate VolumeBindingMode = "Immediate"

	// VolumeBindingWaitForFirstConsumer indicates that PersistentVolumeClaims
	// should not be provisioned and bound until the first Pod is created that
	// references the PeristentVolumeClaim.  The volume provisioning and
	// binding will occur during Pod scheduing.
	VolumeBindingWaitForFirstConsumer VolumeBindingMode = "WaitForFirstConsumer"
)

func (VolumeBindingMode) String

func (c VolumeBindingMode) String() string

type WebhookRepository

type WebhookRepository interface {
	Create(w *types.Webhook) error
	UpdateById(w *types.Webhook) error
	FindById(id int) (v *types.Webhook, err error)
	FindByName(name string) (v *types.Webhook, err error)
	Count(name, appName, ns string) (count int, err error)
	FindOffsetLimit(name, appName, ns string, offset, limit int) (res []*types.Webhook, err error)
	Delete(id int) error
	DeleteEvents(w *types.Webhook) error
	CreateEvents(w *types.Webhook, events ...*types.Event) error
}

func NewWebhookRepository

func NewWebhookRepository(db *gorm.DB) WebhookRepository

type WechatUserRepository

type WechatUserRepository interface {
	FindByOpenid(openid string) (v *types.WechatUser, err error)
	CreateOrUpdate(n *types.WechatUser) error
	UnSubscribe(openid string) error
}

func NewWechatUserRepository

func NewWechatUserRepository(db *gorm.DB) WechatUserRepository

Directories

Path Synopsis
* * Created by GoLand.
* * Created by GoLand.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL