Documentation ¶
Index ¶
- func AlreadyExists(err error) bool
- func NewGormLogger(ctx context.Context) logger.Interface
- type ApiList
- type ArtifactList
- type Client
- func (c *Client) Close()
- func (c *Client) CreateApi(ctx context.Context, v *models.Api) error
- func (c *Client) CreateArtifact(ctx context.Context, v *models.Artifact) error
- func (c *Client) CreateDeploymentRevision(ctx context.Context, v *models.Deployment) error
- func (c *Client) CreateProject(ctx context.Context, v *models.Project) error
- func (c *Client) CreateSpecRevision(ctx context.Context, v *models.Spec) error
- func (c *Client) CreateVersion(ctx context.Context, v *models.Version) error
- func (c *Client) DatabaseName(ctx context.Context) string
- func (c *Client) DeleteApi(ctx context.Context, name names.Api, cascade bool) error
- func (c *Client) DeleteArtifact(ctx context.Context, name names.Artifact) error
- func (c *Client) DeleteDeployment(ctx context.Context, name names.Deployment, cascade bool) error
- func (c *Client) DeleteDeploymentRevision(ctx context.Context, name names.DeploymentRevision) error
- func (c *Client) DeleteProject(ctx context.Context, name names.Project, cascade bool) error
- func (c *Client) DeleteSpec(ctx context.Context, name names.Spec, cascade bool) error
- func (c *Client) DeleteSpecRevision(ctx context.Context, name names.SpecRevision) error
- func (c *Client) DeleteVersion(ctx context.Context, name names.Version, cascade bool) error
- func (c *Client) EnsureTables(ctx context.Context) error
- func (c *Client) GetApi(ctx context.Context, name names.Api) (*models.Api, error)
- func (c *Client) GetArtifact(ctx context.Context, name names.Artifact, forUpdate bool) (*models.Artifact, error)
- func (c *Client) GetArtifactContents(ctx context.Context, name names.Artifact) (*models.Blob, error)
- func (c *Client) GetDeployment(ctx context.Context, name names.Deployment) (*models.Deployment, error)
- func (c *Client) GetDeploymentRevision(ctx context.Context, name names.DeploymentRevision) (*models.Deployment, error)
- func (c *Client) GetProject(ctx context.Context, name names.Project) (*models.Project, error)
- func (c *Client) GetSpec(ctx context.Context, name names.Spec) (*models.Spec, error)
- func (c *Client) GetSpecRevision(ctx context.Context, name names.SpecRevision) (*models.Spec, error)
- func (c *Client) GetSpecRevisionContents(ctx context.Context, name names.SpecRevision) (*models.Blob, error)
- func (c *Client) GetVersion(ctx context.Context, name names.Version) (*models.Version, error)
- func (c *Client) ListApiArtifacts(ctx context.Context, parent names.Api, opts PageOptions) (ArtifactList, error)
- func (c *Client) ListApis(ctx context.Context, parent names.Project, opts PageOptions) (ApiList, error)
- func (c *Client) ListDeploymentArtifacts(ctx context.Context, parent names.Deployment, opts PageOptions) (ArtifactList, error)
- func (c *Client) ListDeploymentRevisionArtifacts(ctx context.Context, parent names.DeploymentRevision, opts PageOptions) (ArtifactList, error)
- func (c *Client) ListDeploymentRevisions(ctx context.Context, parent names.DeploymentRevision, opts PageOptions) (DeploymentList, error)
- func (c *Client) ListDeployments(ctx context.Context, parent names.Api, opts PageOptions) (DeploymentList, error)
- func (c *Client) ListProjectArtifacts(ctx context.Context, parent names.Project, opts PageOptions) (ArtifactList, error)
- func (c *Client) ListProjects(ctx context.Context, opts PageOptions) (ProjectList, error)
- func (c *Client) ListSpecArtifacts(ctx context.Context, parent names.Spec, opts PageOptions) (ArtifactList, error)
- func (c *Client) ListSpecRevisionArtifacts(ctx context.Context, parent names.SpecRevision, opts PageOptions) (ArtifactList, error)
- func (c *Client) ListSpecRevisions(ctx context.Context, parent names.SpecRevision, opts PageOptions) (SpecList, error)
- func (c *Client) ListSpecs(ctx context.Context, parent names.Version, opts PageOptions) (SpecList, error)
- func (c *Client) ListVersionArtifacts(ctx context.Context, parent names.Version, opts PageOptions) (ArtifactList, error)
- func (c *Client) ListVersions(ctx context.Context, parent names.Api, opts PageOptions) (VersionList, error)
- func (c *Client) LockApis(ctx context.Context) *Client
- func (c *Client) LockArtifacts(ctx context.Context) *Client
- func (c *Client) LockDeployments(ctx context.Context) *Client
- func (c *Client) LockProjects(ctx context.Context) *Client
- func (c *Client) LockSpecs(ctx context.Context) *Client
- func (c *Client) LockVersions(ctx context.Context) *Client
- func (c *Client) Migrate(ctx context.Context) error
- func (c *Client) RowCount(ctx context.Context, tableName string) (int64, error)
- func (c *Client) SaveApi(ctx context.Context, v *models.Api) error
- func (c *Client) SaveArtifact(ctx context.Context, v *models.Artifact) error
- func (c *Client) SaveArtifactContents(ctx context.Context, artifact *models.Artifact, contents []byte) error
- func (c *Client) SaveDeploymentRevision(ctx context.Context, v *models.Deployment) error
- func (c *Client) SaveDeploymentRevisionTag(ctx context.Context, v *models.DeploymentRevisionTag) error
- func (c *Client) SaveProject(ctx context.Context, v *models.Project) error
- func (c *Client) SaveSpecRevision(ctx context.Context, v *models.Spec) error
- func (c *Client) SaveSpecRevisionContents(ctx context.Context, spec *models.Spec, contents []byte) error
- func (c *Client) SaveSpecRevisionTag(ctx context.Context, v *models.SpecRevisionTag) error
- func (c *Client) SaveVersion(ctx context.Context, v *models.Version) error
- func (c *Client) TableNames(ctx context.Context) ([]string, error)
- func (c *Client) Transaction(ctx context.Context, fn func(context.Context, *Client) error) error
- type DeploymentList
- type PageOptions
- type ProjectList
- type SpecList
- type VersionList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlreadyExists ¶ added in v0.5.6
Types ¶
type ArtifactList ¶
ArtifactList contains a page of artifact resources.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a connection to a storage provider.
func NewClient ¶
NewClient creates a new database session using the provided driver and data source name. Driver must be one of [ sqlite3, postgres, cloudsqlpostgres ]. DSN format varies per database driver.
PostgreSQL DSN Reference: See "Connection Strings" at https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING SQLite DSN Reference: See "URI filename examples" at https://www.sqlite.org/c3ref/open.html
func (*Client) CreateArtifact ¶ added in v0.5.6
func (*Client) CreateDeploymentRevision ¶ added in v0.5.6
func (*Client) CreateProject ¶ added in v0.5.4
func (*Client) CreateSpecRevision ¶ added in v0.5.6
func (*Client) CreateVersion ¶ added in v0.5.4
func (*Client) DatabaseName ¶ added in v0.4.2
func (*Client) DeleteArtifact ¶
func (*Client) DeleteDeployment ¶ added in v0.3.9
func (*Client) DeleteDeploymentRevision ¶ added in v0.3.9
func (*Client) DeleteProject ¶
func (*Client) DeleteSpec ¶
func (*Client) DeleteSpecRevision ¶
func (*Client) DeleteVersion ¶
func (*Client) EnsureTables ¶ added in v0.4.2
EnsureTables ensures that all necessary tables exist in the database.
func (*Client) GetArtifact ¶
func (*Client) GetArtifactContents ¶
func (*Client) GetDeployment ¶ added in v0.3.9
func (c *Client) GetDeployment(ctx context.Context, name names.Deployment) (*models.Deployment, error)
func (*Client) GetDeploymentRevision ¶ added in v0.3.9
func (c *Client) GetDeploymentRevision(ctx context.Context, name names.DeploymentRevision) (*models.Deployment, error)
func (*Client) GetProject ¶
func (*Client) GetSpecRevision ¶
func (*Client) GetSpecRevisionContents ¶
func (*Client) GetVersion ¶
func (*Client) ListApiArtifacts ¶
func (c *Client) ListApiArtifacts(ctx context.Context, parent names.Api, opts PageOptions) (ArtifactList, error)
func (*Client) ListDeploymentArtifacts ¶ added in v0.3.12
func (c *Client) ListDeploymentArtifacts(ctx context.Context, parent names.Deployment, opts PageOptions) (ArtifactList, error)
func (*Client) ListDeploymentRevisionArtifacts ¶ added in v0.5.7
func (c *Client) ListDeploymentRevisionArtifacts(ctx context.Context, parent names.DeploymentRevision, opts PageOptions) (ArtifactList, error)
func (*Client) ListDeploymentRevisions ¶ added in v0.3.9
func (c *Client) ListDeploymentRevisions(ctx context.Context, parent names.DeploymentRevision, opts PageOptions) (DeploymentList, error)
func (*Client) ListDeployments ¶ added in v0.3.9
func (c *Client) ListDeployments(ctx context.Context, parent names.Api, opts PageOptions) (DeploymentList, error)
func (*Client) ListProjectArtifacts ¶
func (c *Client) ListProjectArtifacts(ctx context.Context, parent names.Project, opts PageOptions) (ArtifactList, error)
func (*Client) ListProjects ¶
func (c *Client) ListProjects(ctx context.Context, opts PageOptions) (ProjectList, error)
func (*Client) ListSpecArtifacts ¶
func (c *Client) ListSpecArtifacts(ctx context.Context, parent names.Spec, opts PageOptions) (ArtifactList, error)
func (*Client) ListSpecRevisionArtifacts ¶ added in v0.5.7
func (c *Client) ListSpecRevisionArtifacts(ctx context.Context, parent names.SpecRevision, opts PageOptions) (ArtifactList, error)
func (*Client) ListSpecRevisions ¶
func (c *Client) ListSpecRevisions(ctx context.Context, parent names.SpecRevision, opts PageOptions) (SpecList, error)
func (*Client) ListVersionArtifacts ¶
func (c *Client) ListVersionArtifacts(ctx context.Context, parent names.Version, opts PageOptions) (ArtifactList, error)
func (*Client) ListVersions ¶
func (c *Client) ListVersions(ctx context.Context, parent names.Api, opts PageOptions) (VersionList, error)
func (*Client) LockArtifacts ¶ added in v0.5.6
func (*Client) LockDeployments ¶ added in v0.5.6
func (*Client) LockProjects ¶ added in v0.5.6
func (*Client) LockVersions ¶ added in v0.5.6
func (*Client) SaveArtifact ¶
SaveArtifact will upsert if key not found
func (*Client) SaveArtifactContents ¶
func (c *Client) SaveArtifactContents(ctx context.Context, artifact *models.Artifact, contents []byte) error
SaveSpecRevisionContents will create a new blob for the artifact
func (*Client) SaveDeploymentRevision ¶ added in v0.3.9
SaveDeploymentRevision will upsert if key not found
func (*Client) SaveDeploymentRevisionTag ¶ added in v0.3.9
func (c *Client) SaveDeploymentRevisionTag(ctx context.Context, v *models.DeploymentRevisionTag) error
SaveDeploymentRevisionTag will upsert if key not found
func (*Client) SaveProject ¶
SaveProject will return codes.NotFound if key not found
func (*Client) SaveSpecRevision ¶
SaveSpecRevision will upsert if key not found
func (*Client) SaveSpecRevisionContents ¶
func (c *Client) SaveSpecRevisionContents(ctx context.Context, spec *models.Spec, contents []byte) error
SaveSpecRevisionContents will create a new blob for the spec
func (*Client) SaveSpecRevisionTag ¶
SaveSpecRevisionTag will upsert if key not found
func (*Client) SaveVersion ¶
SaveVersion will return codes.NotFound if key not found
func (*Client) TableNames ¶ added in v0.4.2
type DeploymentList ¶ added in v0.3.9
type DeploymentList struct { Deployments []models.Deployment Token string }
DeploymentList contains a page of deployment resources.
type PageOptions ¶
type PageOptions struct { // Size is the maximum number of resources to include in the response. // If unspecified, page size defaults to 50. Values above 1000 are coerced to 1000. Size int32 // Filter is the filter string for this listing request, as described at https://google.aip.dev/160. Filter string // Order is the sorting order for this listing request, as described at https://google.aip.dev/132#ordering. Order string // Token is a value returned from with a previous page in a series of listing requests. // If specified, listing will continue from the end of the previous page. Otherwise, // the first page in a listing series will be returned. Token string }
PageOptions contains custom arguments for listing requests.
type ProjectList ¶
ProjectList contains a page of project resources.
type VersionList ¶
VersionList contains a page of version resources.