MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / latestVersion

Function latestVersion

app/controlplane/pkg/data/workflowcontract.go:421–423  ·  view source on GitHub ↗
(ctx context.Context, contract *ent.WorkflowContract)

Source from the content-addressed store, hash-verified

419}
420
421func latestVersion(ctx context.Context, contract *ent.WorkflowContract) (*ent.WorkflowContractVersion, error) {
422 return contract.QueryVersions().Order(ent.Desc(workflowcontractversion.FieldRevision)).First(ctx)
423}
424
425func contractInOrg(ctx context.Context, client *ent.Client, orgID uuid.UUID, contractID *uuid.UUID, name *string, opts ...biz.ContractQueryOpt) (*ent.WorkflowContract, error) {
426 return contractInOrgQuery(ctx, client.Organization.Query(), orgID, contractID, name, opts...)

Callers 6

entWFToBizWFFunction · 0.85
ListMethod · 0.85
DescribeMethod · 0.85
UpdateMethod · 0.85
FindByIDInOrgMethod · 0.85
FindByNameInOrgMethod · 0.85

Calls 4

DescFunction · 0.92
FirstMethod · 0.45
OrderMethod · 0.45
QueryVersionsMethod · 0.45

Tested by

no test coverage detected