87 KiB
query
import "github.com/effective-security/trustyca/internal/db/pgsql/query"
Package query builds the SQL of the PostgreSQL provider and defines the request structs of its list, find and update methods.
A builder returns the SQL and a stable name under which xsql caches it; the variants of a query are keyed by the QueryParams of its request, which also carries the positional arguments in the order of the WHERE clauses:
qp := req.QueryParams()
sql, name := query.ListCertificates(qp)
err := xdb.ExecuteQueryWithPagination(ctx, db, &result, sql, qp)
Tenancy of the CA tables: a list names its org scope with OrgID, Platform (org_id IS NULL) or AllOrgs; a mutation matches the exact scope with org_id IS NOT DISTINCT FROM the org (OrgArg).
The CA lists order by id DESC, the events by (created_at, id) DESC, the orgs and the projects by (name, id) ASC, and page by offset or with a Cursor: the service decodes the cursor of a request with the parser of the list's sort key (ParseCursor, ParseTimeCursor, ParseNameCursor) and the provider encodes the cursor of the next page from the last row with the matching encoder (EncodeCursor, EncodeTimeCursor, EncodeNameCursor). A service parses the cursor of its request with ListCursor, which answers an invalid token as an invalid argument, and takes the page size from Limit, xdb.DefaultPageSize when the request names none.
Index
- Constants
- Variables
- func ActivateIssuer(args ...any) (string, string)
- func AddMember(args ...any) (string, string)
- func CountCertificates(args ...any) (string, string)
- func CountExpiringCertificates(args ...any) (string, string)
- func CountIssuers(args ...any) (string, string)
- func CreateEvent(args ...any) (string, string)
- func CreateInvite(args ...any) (string, string)
- func DeleteAPIKey(args ...any) (string, string)
- func DeleteCrl(args ...any) (string, string)
- func DeleteExpiredCertificates(args ...any) (string, string)
- func DeleteInvite(args ...any) (string, string)
- func DeleteMember(args ...any) (string, string)
- func DeleteRowByID(args ...any) (string, string)
- func DeleteRowByOrgAndID(args ...any) (string, string)
- func EncodeCursor(lastID xdb.ID) string
- func EncodeNameCursor(lastName string, lastID xdb.ID) string
- func EncodeTimeCursor(lastAt xdb.Time, lastID xdb.ID) string
- func ExpireCertificates(args ...any) (string, string)
- func FindIssuer(args ...any) (string, string)
- func FindProfile(args ...any) (string, string)
- func GetAPIKey(args ...any) (string, string)
- func GetCertificateByIssuerSerial(args ...any) (string, string)
- func GetCertificateBySha256(args ...any) (string, string)
- func GetCertificateForUpdate(args ...any) (string, string)
- func GetCrlByIKID(args ...any) (string, string)
- func GetCrlsByIKIDs(args ...any) (string, string)
- func GetInvite(args ...any) (string, string)
- func GetIssuerBySKID(args ...any) (string, string)
- func GetLoginBy(args ...any) (string, string)
- func GetOrgInvites(args ...any) (string, string)
- func GetProjectByAlias(args ...any) (string, string)
- func GetRevoked(args ...any) (string, string)
- func GetRowByColumn(args ...any) (string, string)
- func GetRowByID(args ...any) (string, string)
- func GetUserBy(args ...any) (string, string)
- func GetUserInvites(args ...any) (string, string)
- func GetUserOrgs(args ...any) (string, string)
- func Limit(limit uint32) uint32
- func ListAPIKeys(args ...any) (string, string)
- func ListAllColumns(args ...any) (string, string)
- func ListCertificates(args ...any) (string, string)
- func ListCrlStates(args ...any) (string, string)
- func ListCrls(args ...any) (string, string)
- func ListEvents(args ...any) (string, string)
- func ListIssuers(args ...any) (string, string)
- func ListMemberships(args ...any) (string, string)
- func ListOrgs(args ...any) (string, string)
- func ListProfiles(args ...any) (string, string)
- func ListProjects(args ...any) (string, string)
- func ListRevoked(args ...any) (string, string)
- func ListRevokedCertificates(args ...any) (string, string)
- func ListRoots(args ...any) (string, string)
- func LocationsArg(locations []string) pq.StringArray
- func MetadataArg(m xdb.Metadata) any
- func OrgArg(orgID uint64) xdb.ID
- func PublishCrl(args ...any) (string, string)
- func RegisterAPIKey(args ...any) (string, string)
- func RegisterCertificate(args ...any) (string, string)
- func RegisterIssuer(args ...any) (string, string)
- func RegisterLogin(args ...any) (string, string)
- func RegisterOrg(args ...any) (string, string)
- func RegisterProfile(args ...any) (string, string)
- func RegisterProject(args ...any) (string, string)
- func RegisterRevoked(args ...any) (string, string)
- func RegisterRoot(args ...any) (string, string)
- func RegisterUser(args ...any) (string, string)
- func SetIssuerCrlNumber(args ...any) (string, string)
- func TakeInvite(args ...any) (string, string)
- func UpdateCertificate(args ...any) (string, string)
- func UpdateCertificateStatus(args ...any) (string, string)
- func UpdateIssuer(args ...any) (string, string)
- func UpdateMemberRole(args ...any) (string, string)
- func UpdateOrg(args ...any) (string, string)
- func UpdateProject(args ...any) (string, string)
- func UpdateUser(args ...any) (string, string)
- func UseAPIKey(args ...any) (string, string)
- type BuildQueryFunc
- type CountCertificatesRequest
- type CountIssuersRequest
- type Cursor
- func ListCursor(ctx context.Context, cursor string, parse func(string) (Cursor, error)) (Cursor, error)
- func NewCursor(lastID uint64) Cursor
- func ParseCursor(cursor string) (Cursor, error)
- func ParseNameCursor(cursor string) (Cursor, error)
- func ParseTimeCursor(cursor string) (Cursor, error)
- func (c Cursor) IsSet() bool
- func (c Cursor) Key() []any
- func (c Cursor) LastID() uint64
- type DeleteExpiredCertificatesRequest
- type DeleteInviteRequest
- type DeleteMemberRequest
- type ExpireCertificatesRequest
- type FindIssuerRequest
- type FindProfileRequest
- type GetInviteRequest
- type GetRevokedRequest
- type ListAPIKeysRequest
- type ListCertificatesRequest
- type ListCrlStatesRequest
- type ListCrlsRequest
- type ListEventsRequest
- type ListIssuersRequest
- type ListMembershipsRequest
- type ListOrgsRequest
- type ListProfilesRequest
- type ListProjectsRequest
- type ListRevokedCertificatesRequest
- type ListRevokedRequest
- type ListRootsRequest
- type OrderDirection
- type RevokeCertificateRequest
- type SummaryRequest
- type UpdateCertificateRequest
- type UpdateIssuerRequest
- type UpdateMemberRoleRequest
- type UpdateOrgRequest
- type UpdateProjectRequest
Constants
InitialCursor starts cursor pagination; the next pages pass the cursor of the previous result
const InitialCursor = "initial"
Variables
ErrOrgRequired is returned by a count request that names no org: the counts of the tenant summary are an org's
var ErrOrgRequired = errors.New("org ID is required")
ErrOrgScopeRequired is returned by a list request that names neither an org, nor the platform, nor every org: a list of CA rows fails closed
var ErrOrgScopeRequired = errors.New("org scope is required: set OrgID, Platform or AllOrgs")
func ActivateIssuer
func ActivateIssuer(args ...any) (string, string)
ActivateIssuer returns SQL query to set the certificate of a Pending issuer, clear its CSR and make it Active. The arguments are the certificate columns, the Active status, the issuer ID, the Pending status and the org of the issuer (NULL for the platform).
func AddMember
func AddMember(args ...any) (string, string)
AddMember returns SQL query to create or update a membership at its scope
func CountCertificates
func CountCertificates(args ...any) (string, string)
CountCertificates returns SQL query to count the certificates of a scope by status: a row per status with certificates, read from the entries of idx_certificate_org_project_status_notafter
func CountExpiringCertificates
func CountExpiringCertificates(args ...any) (string, string)
CountExpiringCertificates returns SQL query to count the certificates of a scope and a status whose validity ends within a period: the arguments after the scope are the status, the start and the end of the period. The range of a project is served by idx_certificate_org_project_status_notafter.
func CountIssuers
func CountIssuers(args ...any) (string, string)
CountIssuers returns SQL query to count the issuers of a scope by status: a row per status with issuers, served by the idx_issuer_org_project_status index
func CreateEvent
func CreateEvent(args ...any) (string, string)
CreateEvent returns SQL query
func CreateInvite
func CreateInvite(args ...any) (string, string)
CreateInvite returns SQL query to create or update an invite at its scope
func DeleteAPIKey
func DeleteAPIKey(args ...any) (string, string)
DeleteAPIKey returns SQL query to delete an API key of an org
func DeleteCrl
func DeleteCrl(args ...any) (string, string)
DeleteCrl returns SQL query to delete the CRL of an issuer by the exact org scope (NULL for the platform) and IKID
func DeleteExpiredCertificates
func DeleteExpiredCertificates(args ...any) (string, string)
DeleteExpiredCertificates returns SQL query to delete a batch of certificates that expired before a time; the revocations follow by cascade. The arguments are the time and the batch limit.
func DeleteInvite
func DeleteInvite(args ...any) (string, string)
DeleteInvite returns SQL query
func DeleteMember
func DeleteMember(args ...any) (string, string)
DeleteMember returns SQL query
func DeleteRowByID
func DeleteRowByID(args ...any) (string, string)
DeleteRowByID returns SQL query, the first argument is the table info
func DeleteRowByOrgAndID
func DeleteRowByOrgAndID(args ...any) (string, string)
DeleteRowByOrgAndID returns SQL query to delete a row of a CA table by its exact org scope and ID: the first argument is the table info, the query arguments are the org ID (NULL for the platform, see OrgArg) and the row ID
func EncodeCursor
func EncodeCursor(lastID xdb.ID) string
EncodeCursor returns the cursor of the page that follows the row with the ID, for a list that pages by id
func EncodeNameCursor
func EncodeNameCursor(lastName string, lastID xdb.ID) string
EncodeNameCursor returns the cursor of the page that follows the row with the name and the ID, for a list that pages by (name, id)
func EncodeTimeCursor
func EncodeTimeCursor(lastAt xdb.Time, lastID xdb.ID) string
EncodeTimeCursor returns the cursor of the page that follows the row with the creation time and the ID, for a list that pages by (created_at, id)
func ExpireCertificates
func ExpireCertificates(args ...any) (string, string)
ExpireCertificates returns SQL query to set the status of a batch of Active certificates that expired before a time to Expired: the arguments are the Expired status, the Active status of the updated rows, the Active status of the batch, the time and the batch limit. The batch subquery is evaluated on the snapshot the statement started with, so the status is checked again on the updated rows: PostgreSQL rechecks that predicate on the current version of a row the statement waited for, and a certificate RevokeCertificate revoked meanwhile keeps Revoked.
func FindIssuer
func FindIssuer(args ...any) (string, string)
FindIssuer returns SQL query to find an issuer by scope and label
func FindProfile
func FindProfile(args ...any) (string, string)
FindProfile returns SQL query to find a profile by scope and label
func GetAPIKey
func GetAPIKey(args ...any) (string, string)
GetAPIKey returns API key by ID
func GetCertificateByIssuerSerial
func GetCertificateByIssuerSerial(args ...any) (string, string)
GetCertificateByIssuerSerial returns SQL query to find a certificate by its issuer key identifier and serial number
func GetCertificateBySha256
func GetCertificateBySha256(args ...any) (string, string)
GetCertificateBySha256 returns SQL query to find a certificate by its thumbprint
func GetCertificateForUpdate
func GetCertificateForUpdate(args ...any) (string, string)
GetCertificateForUpdate returns SQL query to read a certificate by ID and exact org scope (NULL for the platform), and lock the row for the rest of the transaction
func GetCrlByIKID
func GetCrlByIKID(args ...any) (string, string)
GetCrlByIKID returns SQL query to find the current CRL of an issuer
func GetCrlsByIKIDs
func GetCrlsByIKIDs(args ...any) (string, string)
GetCrlsByIKIDs returns SQL query to find the current CRLs of the issuers with the key identifiers; the argument is the array of IKIDs
func GetInvite
func GetInvite(args ...any) (string, string)
GetInvite returns SQL query to get an invite by org, scope and email
func GetIssuerBySKID
func GetIssuerBySKID(args ...any) (string, string)
GetIssuerBySKID returns SQL query to find an issuer by its Subject Key Identifier, which is the IKID of the certificates it issued
func GetLoginBy
func GetLoginBy(args ...any) (string, string)
GetLoginBy returns SQL query with where clause by column name
func GetOrgInvites
func GetOrgInvites(args ...any) (string, string)
GetOrgInvites returns SQL query to list invites of all scopes for an org
func GetProjectByAlias
func GetProjectByAlias(args ...any) (string, string)
GetProjectByAlias returns SQL query to find a project by org and alias
func GetRevoked
func GetRevoked(args ...any) (string, string)
GetRevoked returns SQL query to find the revocation of a certificate
func GetRowByColumn
func GetRowByColumn(args ...any) (string, string)
GetRowByColumn returns SQL query, the first argument is the table info, the second argument is the column name
func GetRowByID
func GetRowByID(args ...any) (string, string)
GetRowByID returns SQL query, the first argument is the table info
func GetUserBy
func GetUserBy(args ...any) (string, string)
GetUserBy returns SQL query with where clause by column name
func GetUserInvites
func GetUserInvites(args ...any) (string, string)
GetUserInvites returns SQL query to list the pending, not expired invites for a user's email
func GetUserOrgs
func GetUserOrgs(args ...any) (string, string)
GetUserOrgs returns SQL query
func Limit
func Limit(limit uint32) uint32
Limit returns the page size of a list request
func ListAPIKeys
func ListAPIKeys(args ...any) (string, string)
ListAPIKeys selects API keys from the database
func ListAllColumns
func ListAllColumns(args ...any) (string, string)
ListAllColumns returns SQL query to list all columns
func ListCertificates
func ListCertificates(args ...any) (string, string)
ListCertificates returns SQL query to list certificates
func ListCrlStates
func ListCrlStates(args ...any) (string, string)
ListCrlStates returns SQL query to list the CRL states of the issuers of a scope with the statuses, newest first
func ListCrls
func ListCrls(args ...any) (string, string)
ListCrls returns SQL query to list the current CRLs
func ListEvents
func ListEvents(args ...any) (string, string)
ListEvents returns SQL query
func ListIssuers
func ListIssuers(args ...any) (string, string)
ListIssuers returns SQL query to list issuers
func ListMemberships
func ListMemberships(args ...any) (string, string)
ListMemberships returns SQL query: the grants by the email of the user, then by id, so the grants of a user are adjacent in creation order
func ListOrgs
func ListOrgs(args ...any) (string, string)
ListOrgs returns SQL query: the orgs by name, then by id, paged by offset or by a cursor on that key (ParseNameCursor, EncodeNameCursor)
func ListProfiles
func ListProfiles(args ...any) (string, string)
ListProfiles returns SQL query to list certificate profiles
func ListProjects
func ListProjects(args ...any) (string, string)
ListProjects returns SQL query: the projects by name, then by id, paged by offset or by a cursor on that key (ParseNameCursor, EncodeNameCursor)
func ListRevoked
func ListRevoked(args ...any) (string, string)
ListRevoked returns SQL query to list revocations
func ListRevokedCertificates
func ListRevokedCertificates(args ...any) (string, string)
ListRevokedCertificates returns SQL query to list revoked certificates from the vw_revoked_certificate view
func ListRoots
func ListRoots(args ...any) (string, string)
ListRoots returns SQL query to list trust anchors
func LocationsArg
func LocationsArg(locations []string) pq.StringArray
LocationsArg returns the value of a NOT NULL varchar[] locations column: pq.StringArray writes a nil slice as NULL, so an empty array is written instead
func MetadataArg
func MetadataArg(m xdb.Metadata) any
MetadataArg returns the value of a NOT NULL jsonb metadata column: xdb.Metadata.Value() returns NULL for an empty map, so an explicit empty object is written instead
func OrgArg
func OrgArg(orgID uint64) xdb.ID
OrgArg returns the org_id argument of an exact scope: a zero org is the platform's NULL
func PublishCrl
func PublishCrl(args ...any) (string, string)
PublishCrl returns SQL query to store the current CRL of an issuer: the CRL of the same IKID is replaced, keeping its row ID, creation time and issuer (the IKID identifies the issuer, so they never change)
func RegisterAPIKey
func RegisterAPIKey(args ...any) (string, string)
RegisterAPIKey inserts a new API key into the database
func RegisterCertificate
func RegisterCertificate(args ...any) (string, string)
RegisterCertificate returns SQL query to insert an issued certificate
func RegisterIssuer
func RegisterIssuer(args ...any) (string, string)
RegisterIssuer returns SQL query to insert an issuer
func RegisterLogin
func RegisterLogin(args ...any) (string, string)
RegisterLogin returns SQL query to register a login
func RegisterOrg
func RegisterOrg(args ...any) (string, string)
RegisterOrg registers a new org
func RegisterProfile
func RegisterProfile(args ...any) (string, string)
RegisterProfile returns SQL query to create a certificate profile, or to replace the issuer label, status and config of the profile with the same label in the same scope
func RegisterProject
func RegisterProject(args ...any) (string, string)
RegisterProject returns SQL query to create a project
func RegisterRevoked
func RegisterRevoked(args ...any) (string, string)
RegisterRevoked returns SQL query to insert a revocation
func RegisterRoot
func RegisterRoot(args ...any) (string, string)
RegisterRoot returns SQL query to register a trust anchor. Registering the same certificate again in the same scope updates its trust; the same certificate in another scope conflicts and returns no row.
func RegisterUser
func RegisterUser(args ...any) (string, string)
RegisterUser returns SQL query to register a user
func SetIssuerCrlNumber
func SetIssuerCrlNumber(args ...any) (string, string)
SetIssuerCrlNumber returns SQL query to record the number of a published CRL on the issuer whose SKID is the CRL's IKID. The number must be greater than the current one, so the CRL number of an IKID only grows: the arguments are the number, the issuer ID, the IKID and the number.
func TakeInvite
func TakeInvite(args ...any) (string, string)
TakeInvite returns SQL query to delete an invite by ID and return the deleted row, so that an acceptance grants the invite it deletes
func UpdateCertificate
func UpdateCertificate(args ...any) (string, string)
UpdateCertificate returns SQL query to update a certificate
func UpdateCertificateStatus
func UpdateCertificateStatus(args ...any) (string, string)
UpdateCertificateStatus returns SQL query to set the status of a certificate: the arguments are the status and the ID
func UpdateIssuer
func UpdateIssuer(args ...any) (string, string)
UpdateIssuer returns SQL query to update an issuer
func UpdateMemberRole
func UpdateMemberRole(args ...any) (string, string)
UpdateMemberRole returns SQL query
func UpdateOrg
func UpdateOrg(args ...any) (string, string)
UpdateOrg returns SQL query to update a org's name and description
func UpdateProject
func UpdateProject(args ...any) (string, string)
UpdateProject returns SQL query to update a project
func UpdateUser
func UpdateUser(args ...any) (string, string)
UpdateUser returns SQL query to update a user's name and email_verified flag
func UseAPIKey
func UseAPIKey(args ...any) (string, string)
UseAPIKey increments the used count and sets the used at time
type BuildQueryFunc
BuildQueryFunc returns SQL query and name
type BuildQueryFunc func(args ...any) (string, string)
type CountCertificatesRequest
CountCertificatesRequest defines request to count the certificates of an org by status, and the Active certificates whose validity ends within periods after a time: of the whole org, of one project, or of the org-wide scope and the projects of ProjectIDs. The org is required: the counts are a tenant's.
type CountCertificatesRequest struct {
// OrgID is the org whose certificates are counted
OrgID uint64
// ProjectID limits the count to the project
ProjectID uint64
// ProjectIDs limits the count to the org-wide rows and the rows of the
// projects, for a caller with grants in some projects only; nil applies
// no project filter and an empty list keeps the org-wide rows.
// ProjectID takes precedence.
ProjectIDs []uint64
// Now is the start of the expiry periods: a certificate whose validity
// ended before it is expired, not expiring, whatever its status
Now time.Time
// Expiring are the periods after Now within which the Active
// certificates are counted, ascending; each period counts the
// certificates of the shorter ones too. Empty counts no expiring
// certificates.
Expiring []time.Duration
}
func (*CountCertificatesRequest) ExpiringParams
func (r *CountCertificatesRequest) ExpiringParams(within time.Duration) xdb.QueryParams
ExpiringParams returns the query params builder of CountExpiringCertificates for a period: the Active certificates of the scope whose validity ends at or after Now and before Now plus the period
func (*CountCertificatesRequest) QueryParams
func (r *CountCertificatesRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder of CountCertificates
func (*CountCertificatesRequest) Validate
func (r *CountCertificatesRequest) Validate() error
Validate returns ErrOrgRequired when the request names no org, and an error when the periods are not positive and ascending
type CountIssuersRequest
CountIssuersRequest defines request to count the issuers of an org by lifecycle status: of the whole org, of one project, or of the org-wide scope and the projects of ProjectIDs. The org is required: the counts are a tenant's.
type CountIssuersRequest struct {
// OrgID is the org whose issuers are counted
OrgID uint64
// ProjectID limits the count to the project
ProjectID uint64
// ProjectIDs limits the count to the org-wide rows and the rows of the
// projects, for a caller with grants in some projects only; nil applies
// no project filter and an empty list keeps the org-wide rows.
// ProjectID takes precedence.
ProjectIDs []uint64
}
func (*CountIssuersRequest) QueryParams
func (r *CountIssuersRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*CountIssuersRequest) Validate
func (r *CountIssuersRequest) Validate() error
Validate returns ErrOrgRequired when the request names no org
type Cursor
Cursor is the decoded position of a list request that pages by keyset: the typed sort key of the last row of the previous page, in ORDER BY order, which the query binds in a row comparison past that row. The zero value selects offset pagination; NewCursor(0) is the first page of cursor pagination. A list decodes its cursor with the parser of its sort key (ParseCursor, ParseTimeCursor, ParseNameCursor) and encodes the cursor of its next page with the matching encoder. A parser records the kind of its key, and the Validate of a list request refuses the cursor of another list (checkKey) before the query runs.
type Cursor struct {
// contains filtered or unexported fields
}
func ListCursor
func ListCursor(ctx context.Context, cursor string, parse func(string) (Cursor, error)) (Cursor, error)
ListCursor parses the cursor of a list request with the parser of the list's sort key (query.ParseNameCursor for the projects)
func NewCursor
func NewCursor(lastID uint64) Cursor
NewCursor returns the cursor of a list by id that continues after the row with the ID; a zero ID is the first page of cursor pagination of any list
func ParseCursor
func ParseCursor(cursor string) (Cursor, error)
ParseCursor decodes the cursor of a list that pages by id, newest first (the CA lists): empty selects offset pagination, InitialCursor the first page of cursor pagination, otherwise the cursor returned with the previous page, encoded by EncodeCursor
func ParseNameCursor
func ParseNameCursor(cursor string) (Cursor, error)
ParseNameCursor decodes the cursor of a list that pages by (name, id), ascending (the orgs and the projects), encoded by EncodeNameCursor; empty and InitialCursor are as in ParseCursor
func ParseTimeCursor
func ParseTimeCursor(cursor string) (Cursor, error)
ParseTimeCursor decodes the cursor of a list that pages by (created_at, id), newest first (the events), encoded by EncodeTimeCursor; empty and InitialCursor are as in ParseCursor
func (Cursor) IsSet
func (c Cursor) IsSet() bool
IsSet returns true when the request uses cursor pagination
func (Cursor) Key
func (c Cursor) Key() []any
Key returns a copy of the sort key of the last row of the previous page, after which the listing continues: the ID of a list by id, the time and the ID of a list by (created_at, id), the name and the ID of a list by (name, id); nil for the first page and for offset pagination
func (Cursor) LastID
func (c Cursor) LastID() uint64
LastID returns the ID of the last row of the previous page, the last value of the key, after which the listing continues; zero for the first page and for offset pagination
type DeleteExpiredCertificatesRequest
DeleteExpiredCertificatesRequest defines request to delete the certificates of any status whose validity ended before the time, with their revocations, a batch at a time (retention). The batch is the lowest IDs of the remaining rows, so the next batch continues without an offset.
type DeleteExpiredCertificatesRequest struct {
// Before is the time the validity ended before: now minus the retention
// period
Before time.Time
// Limit is the number of certificates one statement deletes
Limit uint32
}
func (*DeleteExpiredCertificatesRequest) Args
func (r *DeleteExpiredCertificatesRequest) Args() []any
Args returns the positional arguments of DeleteExpiredCertificates: the time and the limit
func (*DeleteExpiredCertificatesRequest) Validate
func (r *DeleteExpiredCertificatesRequest) Validate() error
Validate returns error if the request is not valid
type DeleteInviteRequest
DeleteInviteRequest defines request to delete invites. ProjectID deletes the Project scope invite of the project; Scope Org deletes the Org scope invite only; otherwise invites of all scopes matching OrgID and Email are deleted.
type DeleteInviteRequest struct {
OrgID uint64
ProjectID uint64
Email string
Scope pb.Scope_Enum
}
func (*DeleteInviteRequest) QueryParams
func (r *DeleteInviteRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type DeleteMemberRequest
DeleteMemberRequest defines request to delete memberships. ProjectID deletes the Project scope membership of the project; Scope Org deletes the Org scope membership only; otherwise memberships of all scopes matching OrgID and UserID are deleted.
type DeleteMemberRequest struct {
OrgID uint64
ProjectID uint64
UserID uint64
Scope pb.Scope_Enum
}
func (*DeleteMemberRequest) QueryParams
func (r *DeleteMemberRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type ExpireCertificatesRequest
ExpireCertificatesRequest defines request to mark the Active certificates whose validity ended before the time as Expired, a batch at a time. The batch is the lowest IDs of the remaining Active certificates: the status change removes a row from the set, so the next batch continues without an offset (the certificate status task).
type ExpireCertificatesRequest struct {
// Before is the time the validity ended before, typically now
Before time.Time
// Limit is the number of certificates one statement marks
Limit uint32
}
func (*ExpireCertificatesRequest) Args
func (r *ExpireCertificatesRequest) Args() []any
Args returns the positional arguments of ExpireCertificates: the Expired status, the Active status of the updated rows, the Active status of the batch, the time and the limit
func (*ExpireCertificatesRequest) Validate
func (r *ExpireCertificatesRequest) Validate() error
Validate returns error if the request is not valid
type FindIssuerRequest
FindIssuerRequest specifies an issuer by its exact scope and label: a zero OrgID is the platform scope, a zero ProjectID the org scope
type FindIssuerRequest struct {
OrgID uint64
ProjectID uint64
Label string
}
func (*FindIssuerRequest) QueryParams
func (r *FindIssuerRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type FindProfileRequest
FindProfileRequest specifies a profile by its exact scope and label: a zero OrgID is the platform scope, a zero ProjectID the org scope
type FindProfileRequest struct {
OrgID uint64
ProjectID uint64
Label string
}
func (*FindProfileRequest) QueryParams
func (r *FindProfileRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type GetInviteRequest
GetInviteRequest defines request to get an invite by org, scope and email. ProjectID 0 is the Org scope invite.
type GetInviteRequest struct {
OrgID uint64
ProjectID uint64
Email string
}
func (*GetInviteRequest) QueryParams
func (r *GetInviteRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type GetRevokedRequest
GetRevokedRequest specifies the revocation of a certificate by the certificate ID, or by the key identifier of its issuer and its serial number, as OCSP and CRL lookups address it. When both are given, both must match.
type GetRevokedRequest struct {
CertificateID uint64
IKID string
SerialNumber string
}
func (*GetRevokedRequest) QueryParams
func (r *GetRevokedRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*GetRevokedRequest) Validate
func (r *GetRevokedRequest) Validate() error
Validate returns error if the request identifies no certificate
type ListAPIKeysRequest
ListAPIKeysRequest defines request to list API keys of an org. Scopes limits the result to keys that hold all the listed scopes.
type ListAPIKeysRequest struct {
OrgID uint64
ProjectID uint64
Key string
Scopes []string
Status pb.ItemStatus_Enum
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for pagination
Offset uint32
}
func (*ListAPIKeysRequest) QueryParams
func (r *ListAPIKeysRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type ListCertificatesRequest
ListCertificatesRequest defines request to list certificates, newest first. The request names its org scope: OrgID, Platform or AllOrgs; without ProjectID and Scope the certificates of every scope of the org are returned.
type ListCertificatesRequest struct {
// OrgID limits the result to the org
OrgID uint64
// Platform limits the result to the platform certificates (org_id IS
// NULL) when OrgID is zero
Platform bool
// AllOrgs returns the certificates of every org and the platform when
// OrgID is zero, as the CIS lists them by IKID
AllOrgs bool
// ProjectID limits the result to the project
ProjectID uint64
// Scope limits the result to Org scope (project_id IS NULL) or
// Project scope (project_id IS NOT NULL) certificates
Scope pb.Scope_Enum
// ProjectIDs limits the result to the org-wide rows and the rows of the
// projects, for a caller with grants in some projects only; nil applies
// no project filter and an empty list keeps the org-wide rows. ProjectID
// and Scope take precedence.
ProjectIDs []uint64
// IKID limits the result to the certificates of the issuer
IKID string
// SKID limits the result to the certificates of the subject key
SKID string
// Profile limits the result to the profile label
Profile string
// Status limits the result to the status
Status pb.CertificateStatus_Enum
// ExpiringBefore limits the result to the certificates whose validity
// ends before the time
ExpiringBefore *time.Time
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination
Cursor Cursor
}
func (*ListCertificatesRequest) QueryParams
func (r *ListCertificatesRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListCertificatesRequest) Validate
func (r *ListCertificatesRequest) Validate() error
Validate returns ErrOrgScopeRequired when the request names no org scope
type ListCrlStatesRequest
ListCrlStatesRequest defines request to list the issuers of an org that publish CRLs with the state of their current CRL, newest first: the columns the tenant summary classifies (the key identifier, the end of the validity, the settings and the next update of the CRL), never a PEM. The org is required: the states are a tenant's.
type ListCrlStatesRequest struct {
// OrgID is the org whose issuers are listed
OrgID uint64
// ProjectID limits the result to the project
ProjectID uint64
// ProjectIDs limits the result to the org-wide rows and the rows of the
// projects, for a caller with grants in some projects only; nil applies
// no project filter and an empty list keeps the org-wide rows.
// ProjectID takes precedence.
ProjectIDs []uint64
// Statuses are the lifecycle statuses of the issuers that publish CRLs
Statuses []pb.IssuerStatus_Enum
// Limit specifies maximum number of records to return
Limit uint32
// Cursor specifies the position for cursor pagination
Cursor Cursor
}
func (*ListCrlStatesRequest) QueryParams
func (r *ListCrlStatesRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListCrlStatesRequest) Validate
func (r *ListCrlStatesRequest) Validate() error
Validate returns ErrOrgRequired when the request names no org, and an error without a status
type ListCrlsRequest
ListCrlsRequest defines request to list the current CRLs, newest first. The request names its org scope: OrgID, Platform or AllOrgs; the CRL renewal task lists every org with ExpiringBefore set to now plus the renewal period.
type ListCrlsRequest struct {
// OrgID limits the result to the org
OrgID uint64
// Platform limits the result to the platform CRLs (org_id IS NULL) when
// OrgID is zero
Platform bool
// AllOrgs returns the CRLs of every org and the platform when OrgID is
// zero
AllOrgs bool
// ProjectID limits the result to the project
ProjectID uint64
// Scope limits the result to Org scope (project_id IS NULL) or
// Project scope (project_id IS NOT NULL) CRLs
Scope pb.Scope_Enum
// ExpiringBefore limits the result to the CRLs whose next update is
// before the time
ExpiringBefore *time.Time
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination
Cursor Cursor
}
func (*ListCrlsRequest) QueryParams
func (r *ListCrlsRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListCrlsRequest) Validate
func (r *ListCrlsRequest) Validate() error
Validate returns ErrOrgScopeRequired when the request names no org scope
type ListEventsRequest
ListEventsRequest defines request for Events, newest first: the events are sorted by created_at DESC, id DESC, served by the org-led indexes of the event table, and page by offset or by a cursor on that key (ParseTimeCursor, EncodeTimeCursor)
type ListEventsRequest struct {
// OrgID specifies the org
OrgID uint64
// ProjectID specifies the project
ProjectID uint64
// ProjectIDs limits the result to the org-wide events and the events of
// the projects, for a caller with grants in some projects only; nil
// applies no project filter and an empty list keeps the org-wide
// events. ProjectID takes precedence.
ProjectIDs []uint64
// After specifies the inclusive start of the created_at range
After *time.Time
// Before specifies the exclusive end of the created_at range
Before *time.Time
// Type specifies event types to query
Type pb.EventType_Enum
// ReferenceID specifies the referenced entity ID to filter by
ReferenceID uint64
// Email specifies the email to filter by
Email string
// Source specifies the source to filter by
Source string
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination, decoded by
// ParseTimeCursor
Cursor Cursor
}
func (*ListEventsRequest) QueryParams
func (r *ListEventsRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListEventsRequest) Validate
func (r *ListEventsRequest) Validate() error
Validate fails a request that carries the cursor of another list
type ListIssuersRequest
ListIssuersRequest defines request to list issuers, newest first. The request names its org scope: OrgID, Platform or AllOrgs; without ProjectID and Scope the issuers of every scope of the org are returned.
type ListIssuersRequest struct {
// OrgID limits the result to the org
OrgID uint64
// Platform limits the result to the platform issuers (org_id IS NULL)
// when OrgID is zero
Platform bool
// AllOrgs returns the issuers of every org and the platform when OrgID
// is zero, for the service's own tasks
AllOrgs bool
// ProjectID limits the result to the project
ProjectID uint64
// Scope limits the result to Org scope (project_id IS NULL) or
// Project scope (project_id IS NOT NULL) issuers
Scope pb.Scope_Enum
// ProjectIDs limits the result to the org-wide rows and the rows of the
// projects, for a caller with grants in some projects only; nil applies
// no project filter and an empty list keeps the org-wide rows. ProjectID
// and Scope take precedence.
ProjectIDs []uint64
// ParentID limits the result to the issuers signed by the parent
ParentID uint64
// Label limits the result to the issuers with the label, in every scope
// the request covers
Label string
// Status limits the result to the lifecycle status
Status pb.IssuerStatus_Enum
// Type limits the result to the authority type
Type pb.AuthorityType_Enum
// IDs limits the result to the issuers with the IDs; empty applies no
// filter
IDs []uint64
// IKIDs limits the result to the issuers with the key identifiers, as
// the certificates they issued carry them (the SKID of the issuer);
// empty applies no filter
IKIDs []string
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination
Cursor Cursor
}
func (*ListIssuersRequest) QueryParams
func (r *ListIssuersRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListIssuersRequest) Validate
func (r *ListIssuersRequest) Validate() error
Validate returns ErrOrgScopeRequired when the request names no org scope
type ListMembershipsRequest
ListMembershipsRequest defines request to list memberships. Without ProjectID and Scope, memberships of all scopes are returned.
type ListMembershipsRequest struct {
OrgID uint64
UserID uint64
// ProjectID limits the result to the Project scope memberships of the project
ProjectID uint64
// Scope limits the result to Org scope (project_id IS NULL) or
// Project scope (project_id IS NOT NULL) memberships
Scope pb.Scope_Enum
OrgStatus pb.ItemStatus_Enum
Role pb.Role_Enum
// Limit specifies maximum number of records to return; zero is
// xdb.DefaultPageSize, the bound of the callers that read the whole
// scope (the grants of a user, the members of an org)
Limit uint32
// Offset specifies the offset for pagination
Offset uint32
}
func (*ListMembershipsRequest) QueryParams
func (r *ListMembershipsRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type ListOrgsRequest
ListOrgsRequest defined request for list operation on orgs
type ListOrgsRequest struct {
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination, decoded by
// ParseNameCursor
Cursor Cursor
// Status specifies the status of the orgs
Status pb.ItemStatus_Enum
}
func (*ListOrgsRequest) QueryParams
func (r *ListOrgsRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListOrgsRequest) Validate
func (r *ListOrgsRequest) Validate() error
Validate fails a request that carries the cursor of another list
type ListProfilesRequest
ListProfilesRequest defines request to list certificate profiles, newest first. The request names its org scope: OrgID, Platform or AllOrgs; without ProjectID and Scope the profiles of every scope of the org are returned.
type ListProfilesRequest struct {
// OrgID limits the result to the org
OrgID uint64
// Platform limits the result to the platform profiles (org_id IS NULL)
// when OrgID is zero
Platform bool
// AllOrgs returns the profiles of every org and the platform when OrgID
// is zero
AllOrgs bool
// ProjectID limits the result to the project
ProjectID uint64
// Scope limits the result to Org scope (project_id IS NULL) or
// Project scope (project_id IS NOT NULL) profiles
Scope pb.Scope_Enum
// ProjectIDs limits the result to the org-wide rows and the rows of the
// projects, for a caller with grants in some projects only; nil applies
// no project filter and an empty list keeps the org-wide rows. ProjectID
// and Scope take precedence.
ProjectIDs []uint64
// IssuerLabel limits the result to the profiles bound to the issuer label
IssuerLabel string
// Status limits the result to the status
Status pb.ItemStatus_Enum
// IDs limits the result to the profiles with the IDs; empty applies no
// filter
IDs []uint64
// Labels limits the result to the profiles with the labels, in every
// scope the request covers; empty applies no filter
Labels []string
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination
Cursor Cursor
}
func (*ListProfilesRequest) QueryParams
func (r *ListProfilesRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListProfilesRequest) Validate
func (r *ListProfilesRequest) Validate() error
Validate returns ErrOrgScopeRequired when the request names no org scope
type ListProjectsRequest
ListProjectsRequest defines request for list operation on projects
type ListProjectsRequest struct {
// OrgID specifies the org
OrgID uint64
// Status specifies the status of the projects to filter by
Status pb.ItemStatus_Enum
// IDs limits the result to the projects with the IDs;
// used to return only the projects the caller has a grant for
IDs []uint64
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination, decoded by
// ParseNameCursor
Cursor Cursor
}
func (*ListProjectsRequest) QueryParams
func (r *ListProjectsRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListProjectsRequest) Validate
func (r *ListProjectsRequest) Validate() error
Validate fails a request that carries the cursor of another list
type ListRevokedCertificatesRequest
ListRevokedCertificatesRequest defines request to list revoked certificates with their certificate columns, newest revocation first. The request names its org scope: OrgID, Platform or AllOrgs.
type ListRevokedCertificatesRequest struct {
// OrgID limits the result to the org
OrgID uint64
// Platform limits the result to the platform rows (org_id IS NULL) when
// OrgID is zero
Platform bool
// AllOrgs returns the rows of every org and the platform when OrgID is
// zero
AllOrgs bool
// ProjectID limits the result to the project
ProjectID uint64
// Scope limits the result to Org scope (project_id IS NULL) or
// Project scope (project_id IS NOT NULL) rows
Scope pb.Scope_Enum
// ProjectIDs limits the result to the org-wide rows and the rows of the
// projects, for a caller with grants in some projects only; nil applies
// no project filter and an empty list keeps the org-wide rows. ProjectID
// and Scope take precedence.
ProjectIDs []uint64
// IKID limits the result to the certificates of the issuer
IKID string
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination
Cursor Cursor
}
func (*ListRevokedCertificatesRequest) QueryParams
func (r *ListRevokedCertificatesRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListRevokedCertificatesRequest) Validate
func (r *ListRevokedCertificatesRequest) Validate() error
Validate returns ErrOrgScopeRequired when the request names no org scope
type ListRevokedRequest
ListRevokedRequest defines request to list revocations, newest first. The request names its org scope: OrgID, Platform or AllOrgs. A CRL is built from the revocations of an issuer whose certificate is still valid: AllOrgs with IKID and ValidAfter set to the CRL time.
type ListRevokedRequest struct {
// OrgID limits the result to the org
OrgID uint64
// Platform limits the result to the platform rows (org_id IS NULL) when
// OrgID is zero
Platform bool
// AllOrgs returns the revocations of every org and the platform when
// OrgID is zero
AllOrgs bool
// ProjectID limits the result to the project
ProjectID uint64
// Scope limits the result to Org scope (project_id IS NULL) or
// Project scope (project_id IS NOT NULL) rows
Scope pb.Scope_Enum
// IKID limits the result to the certificates of the issuer
IKID string
// ValidAfter limits the result to the certificates whose validity ends
// after the time
ValidAfter *time.Time
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination
Cursor Cursor
}
func (*ListRevokedRequest) QueryParams
func (r *ListRevokedRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListRevokedRequest) Validate
func (r *ListRevokedRequest) Validate() error
Validate returns ErrOrgScopeRequired when the request names no org scope
type ListRootsRequest
ListRootsRequest defines request to list trust anchors, newest first. The request names its org scope: OrgID, Platform or AllOrgs.
type ListRootsRequest struct {
// OrgID limits the result to the org
OrgID uint64
// Platform limits the result to the platform roots (org_id IS NULL)
// when OrgID is zero
Platform bool
// AllOrgs returns the roots of every org and the platform when OrgID is
// zero
AllOrgs bool
// Limit specifies maximum number of records to return
Limit uint32
// Offset specifies the offset for offset pagination
Offset uint32
// Cursor specifies the position for cursor pagination
Cursor Cursor
}
func (*ListRootsRequest) QueryParams
func (r *ListRootsRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
func (*ListRootsRequest) Validate
func (r *ListRootsRequest) Validate() error
Validate returns ErrOrgScopeRequired when the request names no org scope
type OrderDirection
OrderDirection is the direction of the sort key of a list: its columns are all ascending or all descending, and a cursor page filters past the key of the last row with the matching comparison
type OrderDirection int
const (
// OrderDirectionAsc lists the rows in ascending order of the key, and
// a cursor page the rows greater than the key
OrderDirectionAsc OrderDirection = 0
// OrderDirectionDesc lists the rows in descending order of the key,
// newest first for a key that ends with the id, and a cursor page the
// rows less than the key
OrderDirectionDesc OrderDirection = 1
)
type RevokeCertificateRequest
RevokeCertificateRequest defines request to revoke a certificate. The revocation copies the issuer, serial number, expiry and tenancy from the certificate row, so a CRL is built from the revoked table alone.
type RevokeCertificateRequest struct {
CertificateID uint64
// OrgID is the org the certificate belongs to; zero is the platform
// scope. A certificate of another scope is not found.
OrgID uint64
// RevokedAt is the revocation time; zero is now
RevokedAt time.Time
// Reason is the RFC 5280 reason code
Reason pb.ReasonCode_Enum
// ReasonText is an optional free-form note
ReasonText string
}
type SummaryRequest
SummaryRequest defines request for the counts of the tenant summary, read at one snapshot: the issuers by status, the certificates by status and by expiry period, and the CRL states of the issuers that publish CRLs, of an org, one of its projects or the org-wide scope and the projects of ProjectIDs
type SummaryRequest struct {
// OrgID is the org of the summary
OrgID uint64
// ProjectID limits the summary to the project
ProjectID uint64
// ProjectIDs limits the summary to the org-wide rows and the rows of the
// projects, for a caller with grants in some projects only; nil applies
// no project filter and an empty list keeps the org-wide rows.
// ProjectID takes precedence.
ProjectIDs []uint64
// Now is the time of the summary: the start of the expiry periods
Now time.Time
// Expiring are the periods after Now within which the Active
// certificates are counted, ascending
Expiring []time.Duration
// CrlStatuses are the lifecycle statuses of the issuers that publish
// CRLs
CrlStatuses []pb.IssuerStatus_Enum
}
func (*SummaryRequest) Certificates
func (r *SummaryRequest) Certificates() *CountCertificatesRequest
Certificates returns the request of the certificate counts of the scope
func (*SummaryRequest) CrlStates
func (r *SummaryRequest) CrlStates(cursor Cursor) *ListCrlStatesRequest
CrlStates returns the request of a page of the CRL states of the scope: the first page with NewCursor(0), the next with the cursor of the previous page, the default page size
func (*SummaryRequest) Issuers
func (r *SummaryRequest) Issuers() *CountIssuersRequest
Issuers returns the request of the issuer counts of the scope
func (*SummaryRequest) Validate
func (r *SummaryRequest) Validate() error
Validate validates the requests of the three reads
type UpdateCertificateRequest
UpdateCertificateRequest defines request to update the mutable, client-provided columns of a certificate. A nil Label, Metadata or Locations keeps the current value; an empty one clears it.
type UpdateCertificateRequest struct {
ID uint64
// OrgID is the org the certificate belongs to; zero is the platform
// scope. A certificate of another scope is not found.
OrgID uint64
// Label replaces the label when not nil
Label *string
// Metadata replaces the client metadata when not nil
Metadata xdb.Metadata
// Locations replaces the published locations when not nil
Locations []string
}
func (*UpdateCertificateRequest) QueryParams
func (r *UpdateCertificateRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type UpdateIssuerRequest
UpdateIssuerRequest defines request to update the lifecycle status or the runtime settings of an issuer. The DB layer does not enforce the status transitions (Pending -> Active -> Archived -> Destroyed): the service does.
type UpdateIssuerRequest struct {
ID uint64
// OrgID is the org the issuer belongs to; zero is the platform scope.
// An issuer of another scope is not found.
OrgID uint64
// Status changes the lifecycle status when set; Destroyed also clears the
// protected key material, because a destroyed issuer holds no key
Status pb.IssuerStatus_Enum
// Config replaces the runtime settings (pb.IssuerConfig) when set
Config json.RawMessage
}
func (*UpdateIssuerRequest) QueryParams
func (r *UpdateIssuerRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type UpdateMemberRoleRequest
UpdateMemberRoleRequest defines request to change the role of a membership at the given scope: ProjectID 0 is the Org scope membership.
type UpdateMemberRoleRequest struct {
OrgID uint64
ProjectID uint64
UserID uint64
Role pb.Role_Enum
}
func (*UpdateMemberRoleRequest) QueryParams
func (r *UpdateMemberRoleRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
type UpdateOrgRequest
UpdateOrgRequest defined request for updating a org
type UpdateOrgRequest struct {
ID uint64
Status pb.ItemStatus_Enum
Name string
Description string
}
func (*UpdateOrgRequest) QueryParams
func (r *UpdateOrgRequest) QueryParams() xdb.QueryParams
UpdateOrgRequest returns the query params builder
type UpdateProjectRequest
UpdateProjectRequest defines request for updating a project
type UpdateProjectRequest struct {
ID uint64
Name string
Description string
Status pb.ItemStatus_Enum
}
func (*UpdateProjectRequest) QueryParams
func (r *UpdateProjectRequest) QueryParams() xdb.QueryParams
QueryParams returns the query params builder
Generated by gomarkdoc