Documentation ¶
Index ¶
- func NewGormLogger(ctx context.Context) logger.Interface
- type ApiList
- type ArtifactList
- type Client
- func (c *Client) Close()
- func (c *Client) DatabaseName() 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() error
- func (c *Client) GetApi(ctx context.Context, name names.Api) (*models.Api, error)
- func (c *Client) GetArtifact(ctx context.Context, name names.Artifact) (*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) ListDeploymentRevisions(ctx context.Context, parent names.Deployment, 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) ListSpecRevisions(ctx context.Context, parent names.Spec, 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) Migrate(kind string) error
- func (c *Client) RowCount(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() ([]string, error)
- type DeploymentList
- type PageOptions
- type ProjectList
- type SpecList
- type VersionList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) 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) ListDeploymentRevisions ¶ added in v0.3.9
func (c *Client) ListDeploymentRevisions(ctx context.Context, parent names.Deployment, 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) ListSpecRevisions ¶
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) SaveArtifact ¶
func (*Client) SaveArtifactContents ¶
func (*Client) SaveDeploymentRevision ¶ added in v0.3.9
func (*Client) SaveDeploymentRevisionTag ¶ added in v0.3.9
func (*Client) SaveProject ¶
func (*Client) SaveSpecRevision ¶
func (*Client) SaveSpecRevisionContents ¶
func (*Client) SaveSpecRevisionTag ¶
func (*Client) SaveVersion ¶
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 // 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.