Documentation ¶
Index ¶
- type Account
- type AwsAttestation
- type Certificate
- type CreateProvisionerAccountParams
- type CreateServiceAccountParams
- type CreateUserParams
- type DBTX
- type DatabaseEndpoints
- type GetServiceAccountByMetadataParams
- type GetSignedCertificateByMetadataParams
- type ListCertificateSubjectAlternativeNameParams
- type ListCertificatesParams
- type ListProvisionerAccountsParams
- type ListServiceAccountsParams
- type ListUsersParams
- type ListValidCertificateAuthorityFromSubordinateCAParams
- type LogCertificateParams
- type Provisioner
- type ProvisionerAccountAttestation
- type Querier
- type Queries
- func (q *Queries) CreateProvisionerAccount(ctx context.Context, arg CreateProvisionerAccountParams) (*Provisioner, error)
- func (q *Queries) CreateServiceAccount(ctx context.Context, arg CreateServiceAccountParams) (*Account, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (*User, error)
- func (q *Queries) DeleteInstanceIdentityDocument(ctx context.Context, clientID uuid.UUID) error
- func (q *Queries) DeleteProvisionerAccount(ctx context.Context, clientID uuid.UUID) error
- func (q *Queries) DeleteServiceAccount(ctx context.Context, clientID uuid.UUID) error
- func (q *Queries) DeleteUser(ctx context.Context, username string) error
- func (q *Queries) GetCertificate(ctx context.Context, serialNumber string) (*Certificate, error)
- func (q *Queries) GetInstanceIdentityDocument(ctx context.Context, clientID uuid.UUID) (*AwsAttestation, error)
- func (q *Queries) GetProvisionerUUID(ctx context.Context, clientID uuid.UUID) (*Provisioner, error)
- func (q *Queries) GetServiceAccountByMetadata(ctx context.Context, arg GetServiceAccountByMetadataParams) ([]*Account, error)
- func (q *Queries) GetServiceAccountBySAN(ctx context.Context, dollar_1 []string) ([]*Account, error)
- func (q *Queries) GetServiceAccounts(ctx context.Context, serviceAccount string) ([]*Account, error)
- func (q *Queries) GetServiceUUID(ctx context.Context, clientID uuid.UUID) (*Account, error)
- func (q *Queries) GetSignedCertificateByMetadata(ctx context.Context, arg GetSignedCertificateByMetadataParams) ([]*Certificate, error)
- func (q *Queries) GetUser(ctx context.Context, username string) (*User, error)
- func (q *Queries) ListCertificateSubjectAlternativeName(ctx context.Context, arg ListCertificateSubjectAlternativeNameParams) ([]*Certificate, error)
- func (q *Queries) ListCertificates(ctx context.Context, arg ListCertificatesParams) ([]*Certificate, error)
- func (q *Queries) ListProvisionerAccounts(ctx context.Context, arg ListProvisionerAccountsParams) ([]*Provisioner, error)
- func (q *Queries) ListServiceAccounts(ctx context.Context, arg ListServiceAccountsParams) ([]*Account, error)
- func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]*User, error)
- func (q *Queries) ListValidCertificateAuthorityFromSubordinateCA(ctx context.Context, arg ListValidCertificateAuthorityFromSubordinateCAParams) ([]interface{}, error)
- func (q *Queries) LogCertificate(ctx context.Context, arg LogCertificateParams) (*Certificate, error)
- func (q *Queries) RevokeIssuedCertificateSerialNumber(ctx context.Context, arg RevokeIssuedCertificateSerialNumberParams) error
- func (q *Queries) StoreInstanceIdentityDocument(ctx context.Context, arg StoreInstanceIdentityDocumentParams) (*AwsAttestation, error)
- func (q *Queries) UpdateInstanceIdentityNodeAttestor(ctx context.Context, arg UpdateInstanceIdentityNodeAttestorParams) (*Account, error)
- func (q *Queries) UpdateServiceAccount(ctx context.Context, arg UpdateServiceAccountParams) (*Account, error)
- func (q *Queries) UpdateUserAuthentication(ctx context.Context, arg UpdateUserAuthenticationParams) (*User, error)
- func (q *Queries) UpdateUserPermission(ctx context.Context, arg UpdateUserPermissionParams) (*User, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type RevokeIssuedCertificateSerialNumberParams
- type SQLStore
- func (store *SQLStore) TxCreateProvisionerAccount(ctx context.Context, arg CreateProvisionerAccountParams, ...) (*Provisioner, error)
- func (store *SQLStore) TxCreateServiceAccount(ctx context.Context, arg CreateServiceAccountParams, ...) (*Account, error)
- func (store *SQLStore) TxDeleteProvisionerAccount(ctx context.Context, client_id uuid.UUID) error
- func (store *SQLStore) TxDeleteServiceAccount(ctx context.Context, client_id uuid.UUID) error
- func (store *SQLStore) TxUpdateServiceAccount(ctx context.Context, arg Account, attestation types.NodeAttestation) (*Account, error)
- type ServiceAccountAttestation
- type Store
- type StoreInstanceIdentityDocumentParams
- type UpdateInstanceIdentityNodeAttestorParams
- type UpdateServiceAccountParams
- type UpdateUserAuthenticationParams
- type UpdateUserPermissionParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ClientID uuid.UUID `json:"client_id"` ApiToken string `json:"api_token"` ServiceAccount string `json:"service_account"` Environment string `json:"environment"` Team string `json:"team"` Email string `json:"email"` RegularExpression sql.NullString `json:"regular_expression"` ValidSubjectAlternateName []string `json:"valid_subject_alternate_name"` ValidCertificateAuthorities []string `json:"valid_certificate_authorities"` ExtendedKey string `json:"extended_key"` CertificateValidity int16 `json:"certificate_validity"` SubordinateCa string `json:"subordinate_ca"` Provisioned bool `json:"provisioned"` NodeAttestation []string `json:"node_attestation"` CreatedAt time.Time `json:"created_at"` CreatedBy uuid.UUID `json:"created_by"` }
type AwsAttestation ¶
type AwsAttestation struct { ClientID uuid.UUID `json:"client_id"` RoleArn sql.NullString `json:"role_arn"` AssumeRole sql.NullString `json:"assume_role"` SecurityGroupID []string `json:"security_group_id"` Region sql.NullString `json:"region"` InstanceID sql.NullString `json:"instance_id"` ImageID sql.NullString `json:"image_id"` InstanceTags pqtype.NullRawMessage `json:"instance_tags"` }
type Certificate ¶
type Certificate struct { SerialNumber string `json:"serial_number"` Account string `json:"account"` Environment string `json:"environment"` ExtendedKey string `json:"extended_key"` CommonName string `json:"common_name"` SubjectAlternativeName []string `json:"subject_alternative_name"` ExpirationDate time.Time `json:"expiration_date"` IssuedDate time.Time `json:"issued_date"` Revoked bool `json:"revoked"` RevokedBy sql.NullString `json:"revoked_by"` RevokeDate sql.NullTime `json:"revoke_date"` CertificateAuthorityArn sql.NullString `json:"certificate_authority_arn"` }
type CreateProvisionerAccountParams ¶
type CreateProvisionerAccountParams struct { ClientID uuid.UUID `json:"client_id"` ApiToken string `json:"api_token"` ProvisionerAccount string `json:"provisioner_account"` Environments []string `json:"environments"` Team string `json:"team"` Email string `json:"email"` RegularExpression sql.NullString `json:"regular_expression"` NodeAttestation []string `json:"node_attestation"` ValidSubjectAlternateNames []string `json:"valid_subject_alternate_names"` ExtendedKeys []string `json:"extended_keys"` MaxCertificateValidity int16 `json:"max_certificate_validity"` CreatedAt time.Time `json:"created_at"` CreatedBy uuid.UUID `json:"created_by"` }
type CreateServiceAccountParams ¶
type CreateServiceAccountParams struct { ClientID uuid.UUID `json:"client_id"` ApiToken string `json:"api_token"` ServiceAccount string `json:"service_account"` Environment string `json:"environment"` Team string `json:"team"` Email string `json:"email"` RegularExpression sql.NullString `json:"regular_expression"` ValidSubjectAlternateName []string `json:"valid_subject_alternate_name"` ValidCertificateAuthorities []string `json:"valid_certificate_authorities"` ExtendedKey string `json:"extended_key"` CertificateValidity int16 `json:"certificate_validity"` SubordinateCa string `json:"subordinate_ca"` Provisioned bool `json:"provisioned"` NodeAttestation []string `json:"node_attestation"` CreatedAt time.Time `json:"created_at"` CreatedBy uuid.UUID `json:"created_by"` }
type CreateUserParams ¶
type DatabaseEndpoints ¶
type ListCertificatesParams ¶
type ListUsersParams ¶
type LogCertificateParams ¶
type LogCertificateParams struct { SerialNumber string `json:"serial_number"` Account string `json:"account"` Environment string `json:"environment"` ExtendedKey string `json:"extended_key"` CommonName string `json:"common_name"` SubjectAlternativeName []string `json:"subject_alternative_name"` ExpirationDate time.Time `json:"expiration_date"` IssuedDate time.Time `json:"issued_date"` CertificateAuthorityArn sql.NullString `json:"certificate_authority_arn"` }
type Provisioner ¶
type Provisioner struct { ClientID uuid.UUID `json:"client_id"` ApiToken string `json:"api_token"` ProvisionerAccount string `json:"provisioner_account"` Environments []string `json:"environments"` Team string `json:"team"` Email string `json:"email"` RegularExpression sql.NullString `json:"regular_expression"` ValidSubjectAlternateNames []string `json:"valid_subject_alternate_names"` ExtendedKeys []string `json:"extended_keys"` MaxCertificateValidity int16 `json:"max_certificate_validity"` NodeAttestation []string `json:"node_attestation"` CreatedAt time.Time `json:"created_at"` CreatedBy uuid.UUID `json:"created_by"` }
type ProvisionerAccountAttestation ¶
type ProvisionerAccountAttestation struct { ProvisionerAccount Provisioner `json:"provisioner_account"` AwsIid AwsAttestation `json:"aws_iid"` }
type Querier ¶
type Querier interface { CreateProvisionerAccount(ctx context.Context, arg CreateProvisionerAccountParams) (*Provisioner, error) CreateServiceAccount(ctx context.Context, arg CreateServiceAccountParams) (*Account, error) CreateUser(ctx context.Context, arg CreateUserParams) (*User, error) DeleteInstanceIdentityDocument(ctx context.Context, clientID uuid.UUID) error DeleteProvisionerAccount(ctx context.Context, clientID uuid.UUID) error DeleteServiceAccount(ctx context.Context, clientID uuid.UUID) error DeleteUser(ctx context.Context, username string) error GetCertificate(ctx context.Context, serialNumber string) (*Certificate, error) GetInstanceIdentityDocument(ctx context.Context, clientID uuid.UUID) (*AwsAttestation, error) GetProvisionerUUID(ctx context.Context, clientID uuid.UUID) (*Provisioner, error) GetServiceAccountByMetadata(ctx context.Context, arg GetServiceAccountByMetadataParams) ([]*Account, error) GetServiceAccountBySAN(ctx context.Context, dollar_1 []string) ([]*Account, error) GetServiceAccounts(ctx context.Context, serviceAccount string) ([]*Account, error) GetServiceUUID(ctx context.Context, clientID uuid.UUID) (*Account, error) GetSignedCertificateByMetadata(ctx context.Context, arg GetSignedCertificateByMetadataParams) ([]*Certificate, error) GetUser(ctx context.Context, username string) (*User, error) ListCertificateSubjectAlternativeName(ctx context.Context, arg ListCertificateSubjectAlternativeNameParams) ([]*Certificate, error) ListCertificates(ctx context.Context, arg ListCertificatesParams) ([]*Certificate, error) ListProvisionerAccounts(ctx context.Context, arg ListProvisionerAccountsParams) ([]*Provisioner, error) ListServiceAccounts(ctx context.Context, arg ListServiceAccountsParams) ([]*Account, error) ListUsers(ctx context.Context, arg ListUsersParams) ([]*User, error) ListValidCertificateAuthorityFromSubordinateCA(ctx context.Context, arg ListValidCertificateAuthorityFromSubordinateCAParams) ([]interface{}, error) LogCertificate(ctx context.Context, arg LogCertificateParams) (*Certificate, error) RevokeIssuedCertificateSerialNumber(ctx context.Context, arg RevokeIssuedCertificateSerialNumberParams) error StoreInstanceIdentityDocument(ctx context.Context, arg StoreInstanceIdentityDocumentParams) (*AwsAttestation, error) UpdateInstanceIdentityNodeAttestor(ctx context.Context, arg UpdateInstanceIdentityNodeAttestorParams) (*Account, error) UpdateServiceAccount(ctx context.Context, arg UpdateServiceAccountParams) (*Account, error) UpdateUserAuthentication(ctx context.Context, arg UpdateUserAuthenticationParams) (*User, error) UpdateUserPermission(ctx context.Context, arg UpdateUserPermissionParams) (*User, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateProvisionerAccount ¶
func (q *Queries) CreateProvisionerAccount(ctx context.Context, arg CreateProvisionerAccountParams) (*Provisioner, error)
func (*Queries) CreateServiceAccount ¶
func (*Queries) CreateUser ¶
func (*Queries) DeleteInstanceIdentityDocument ¶
func (*Queries) DeleteProvisionerAccount ¶
func (*Queries) DeleteServiceAccount ¶
func (*Queries) DeleteUser ¶
func (*Queries) GetCertificate ¶
func (*Queries) GetInstanceIdentityDocument ¶
func (*Queries) GetProvisionerUUID ¶
func (*Queries) GetServiceAccountByMetadata ¶
func (*Queries) GetServiceAccountBySAN ¶
func (*Queries) GetServiceAccounts ¶
func (*Queries) GetServiceUUID ¶
func (*Queries) GetSignedCertificateByMetadata ¶
func (q *Queries) GetSignedCertificateByMetadata(ctx context.Context, arg GetSignedCertificateByMetadataParams) ([]*Certificate, error)
func (*Queries) ListCertificateSubjectAlternativeName ¶
func (q *Queries) ListCertificateSubjectAlternativeName(ctx context.Context, arg ListCertificateSubjectAlternativeNameParams) ([]*Certificate, error)
func (*Queries) ListCertificates ¶
func (q *Queries) ListCertificates(ctx context.Context, arg ListCertificatesParams) ([]*Certificate, error)
func (*Queries) ListProvisionerAccounts ¶
func (q *Queries) ListProvisionerAccounts(ctx context.Context, arg ListProvisionerAccountsParams) ([]*Provisioner, error)
func (*Queries) ListServiceAccounts ¶
func (*Queries) ListValidCertificateAuthorityFromSubordinateCA ¶
func (q *Queries) ListValidCertificateAuthorityFromSubordinateCA(ctx context.Context, arg ListValidCertificateAuthorityFromSubordinateCAParams) ([]interface{}, error)
func (*Queries) LogCertificate ¶
func (q *Queries) LogCertificate(ctx context.Context, arg LogCertificateParams) (*Certificate, error)
func (*Queries) RevokeIssuedCertificateSerialNumber ¶
func (q *Queries) RevokeIssuedCertificateSerialNumber(ctx context.Context, arg RevokeIssuedCertificateSerialNumberParams) error
func (*Queries) StoreInstanceIdentityDocument ¶
func (q *Queries) StoreInstanceIdentityDocument(ctx context.Context, arg StoreInstanceIdentityDocumentParams) (*AwsAttestation, error)
func (*Queries) UpdateInstanceIdentityNodeAttestor ¶
func (*Queries) UpdateServiceAccount ¶
func (*Queries) UpdateUserAuthentication ¶
func (*Queries) UpdateUserPermission ¶
type RevokeIssuedCertificateSerialNumberParams ¶
type RevokeIssuedCertificateSerialNumberParams struct { SerialNumber string `json:"serial_number"` RevokeDate sql.NullTime `json:"revoke_date"` RevokedBy sql.NullString `json:"revoked_by"` }
type SQLStore ¶
type SQLStore struct { *Queries // contains filtered or unexported fields }
func (*SQLStore) TxCreateProvisionerAccount ¶
func (store *SQLStore) TxCreateProvisionerAccount(ctx context.Context, arg CreateProvisionerAccountParams, iid StoreInstanceIdentityDocumentParams) (*Provisioner, error)
func (*SQLStore) TxCreateServiceAccount ¶
func (store *SQLStore) TxCreateServiceAccount(ctx context.Context, arg CreateServiceAccountParams, iid StoreInstanceIdentityDocumentParams) (*Account, error)
func (*SQLStore) TxDeleteProvisionerAccount ¶
func (*SQLStore) TxDeleteServiceAccount ¶
func (*SQLStore) TxUpdateServiceAccount ¶
type ServiceAccountAttestation ¶
type ServiceAccountAttestation struct { ServiceAccount Account `json:"service_account"` AwsIid AwsAttestation `json:"aws_iid"` }
type Store ¶
type Store interface { Querier TxCreateServiceAccount(ctx context.Context, arg CreateServiceAccountParams, iid StoreInstanceIdentityDocumentParams) (*Account, error) TxDeleteServiceAccount(ctx context.Context, client_id uuid.UUID) error TxUpdateServiceAccount(ctx context.Context, arg Account, attestation types.NodeAttestation) (*Account, error) TxCreateProvisionerAccount(ctx context.Context, arg CreateProvisionerAccountParams, iid StoreInstanceIdentityDocumentParams) (*Provisioner, error) TxDeleteProvisionerAccount(ctx context.Context, client_id uuid.UUID) error }
func BuildDatastore ¶
func BuildReadDatastore ¶
type StoreInstanceIdentityDocumentParams ¶
type StoreInstanceIdentityDocumentParams struct { ClientID uuid.UUID `json:"client_id"` RoleArn sql.NullString `json:"role_arn"` AssumeRole sql.NullString `json:"assume_role"` SecurityGroupID []string `json:"security_group_id"` Region sql.NullString `json:"region"` InstanceID sql.NullString `json:"instance_id"` ImageID sql.NullString `json:"image_id"` InstanceTags pqtype.NullRawMessage `json:"instance_tags"` }
type UpdateServiceAccountParams ¶
type UpdateServiceAccountParams struct { ClientID uuid.UUID `json:"client_id"` Environment string `json:"environment"` Team string `json:"team"` Email string `json:"email"` RegularExpression sql.NullString `json:"regular_expression"` ValidSubjectAlternateName []string `json:"valid_subject_alternate_name"` ValidCertificateAuthorities []string `json:"valid_certificate_authorities"` ExtendedKey string `json:"extended_key"` CertificateValidity int16 `json:"certificate_validity"` SubordinateCa string `json:"subordinate_ca"` NodeAttestation []string `json:"node_attestation"` }
type User ¶
type User struct { Uuid uuid.UUID `json:"uuid"` Username string `json:"username"` HashedCredential string `json:"hashed_credential"` FullName string `json:"full_name"` Email string `json:"email"` Permissions string `json:"permissions"` CredentialChangedAt time.Time `json:"credential_changed_at"` CreatedAt time.Time `json:"created_at"` }
Click to show internal directories.
Click to hide internal directories.