Documentation ¶
Index ¶
- type Bundle
- type CreateBundleParams
- type CreateJoinTokenParams
- type CreateRelationshipParams
- type CreateTrustDomainParams
- type DBTX
- type Datastore
- func (d *Datastore) Close() error
- func (d *Datastore) CreateJoinToken(ctx context.Context, req *entity.JoinToken) (*entity.JoinToken, error)
- func (d *Datastore) CreateOrUpdateBundle(ctx context.Context, req *entity.Bundle) (*entity.Bundle, error)
- func (d *Datastore) CreateOrUpdateRelationship(ctx context.Context, req *entity.Relationship) (*entity.Relationship, error)
- func (d *Datastore) CreateOrUpdateTrustDomain(ctx context.Context, req *entity.TrustDomain) (*entity.TrustDomain, error)
- func (d *Datastore) DeleteBundle(ctx context.Context, bundleID uuid.UUID) error
- func (d *Datastore) DeleteJoinToken(ctx context.Context, joinTokenID uuid.UUID) error
- func (d *Datastore) DeleteRelationship(ctx context.Context, relationshipID uuid.UUID) error
- func (d *Datastore) DeleteTrustDomain(ctx context.Context, trustDomainID uuid.UUID) error
- func (d *Datastore) FindBundleByID(ctx context.Context, bundleID uuid.UUID) (*entity.Bundle, error)
- func (d *Datastore) FindBundleByTrustDomainID(ctx context.Context, trustDomainID uuid.UUID) (*entity.Bundle, error)
- func (d *Datastore) FindJoinToken(ctx context.Context, token string) (*entity.JoinToken, error)
- func (d *Datastore) FindJoinTokensByID(ctx context.Context, joinTokenID uuid.UUID) (*entity.JoinToken, error)
- func (d *Datastore) FindJoinTokensByTrustDomainID(ctx context.Context, trustDomainID uuid.UUID) ([]*entity.JoinToken, error)
- func (d *Datastore) FindRelationshipByID(ctx context.Context, relationshipID uuid.UUID) (*entity.Relationship, error)
- func (d *Datastore) FindRelationshipsByTrustDomainID(ctx context.Context, trustDomainID uuid.UUID) ([]*entity.Relationship, error)
- func (d *Datastore) FindTrustDomainByID(ctx context.Context, trustDomainID uuid.UUID) (*entity.TrustDomain, error)
- func (d *Datastore) FindTrustDomainByName(ctx context.Context, name spiffeid.TrustDomain) (*entity.TrustDomain, error)
- func (d *Datastore) ListBundles(ctx context.Context) ([]*entity.Bundle, error)
- func (d *Datastore) ListJoinTokens(ctx context.Context) ([]*entity.JoinToken, error)
- func (d *Datastore) ListRelationships(ctx context.Context, criteria *criteria.ListRelationshipsCriteria) ([]*entity.Relationship, error)
- func (d *Datastore) ListTrustDomains(ctx context.Context) ([]*entity.TrustDomain, error)
- func (d *Datastore) UpdateJoinToken(ctx context.Context, joinTokenID uuid.UUID, used bool) (*entity.JoinToken, error)
- type FindRelationshipsByTrustDomainIDParams
- type JoinToken
- type Querier
- type Queries
- func (q *Queries) Close() error
- func (q *Queries) CreateBundle(ctx context.Context, arg CreateBundleParams) (Bundle, error)
- func (q *Queries) CreateJoinToken(ctx context.Context, arg CreateJoinTokenParams) (JoinToken, error)
- func (q *Queries) CreateRelationship(ctx context.Context, arg CreateRelationshipParams) (Relationship, error)
- func (q *Queries) CreateTrustDomain(ctx context.Context, arg CreateTrustDomainParams) (TrustDomain, error)
- func (q *Queries) DeleteBundle(ctx context.Context, id string) error
- func (q *Queries) DeleteJoinToken(ctx context.Context, id string) error
- func (q *Queries) DeleteRelationship(ctx context.Context, id string) error
- func (q *Queries) DeleteTrustDomain(ctx context.Context, id string) error
- func (q *Queries) FindBundleByID(ctx context.Context, id string) (Bundle, error)
- func (q *Queries) FindBundleByTrustDomainID(ctx context.Context, trustDomainID string) (Bundle, error)
- func (q *Queries) FindJoinToken(ctx context.Context, token string) (JoinToken, error)
- func (q *Queries) FindJoinTokenByID(ctx context.Context, id string) (JoinToken, error)
- func (q *Queries) FindJoinTokensByTrustDomainID(ctx context.Context, trustDomainID string) ([]JoinToken, error)
- func (q *Queries) FindRelationshipByID(ctx context.Context, id string) (Relationship, error)
- func (q *Queries) FindRelationshipsByTrustDomainID(ctx context.Context, arg FindRelationshipsByTrustDomainIDParams) ([]Relationship, error)
- func (q *Queries) FindTrustDomainByID(ctx context.Context, id string) (TrustDomain, error)
- func (q *Queries) FindTrustDomainByName(ctx context.Context, name string) (TrustDomain, error)
- func (q *Queries) ListBundles(ctx context.Context) ([]Bundle, error)
- func (q *Queries) ListJoinTokens(ctx context.Context) ([]JoinToken, error)
- func (q *Queries) ListTrustDomains(ctx context.Context) ([]TrustDomain, error)
- func (q *Queries) UpdateBundle(ctx context.Context, arg UpdateBundleParams) (Bundle, error)
- func (q *Queries) UpdateJoinToken(ctx context.Context, arg UpdateJoinTokenParams) (JoinToken, error)
- func (q *Queries) UpdateRelationship(ctx context.Context, arg UpdateRelationshipParams) (Relationship, error)
- func (q *Queries) UpdateTrustDomain(ctx context.Context, arg UpdateTrustDomainParams) (TrustDomain, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Relationship
- type TrustDomain
- type UpdateBundleParams
- type UpdateJoinTokenParams
- type UpdateRelationshipParams
- type UpdateTrustDomainParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type CreateBundleParams ¶
type CreateJoinTokenParams ¶
type CreateTrustDomainParams ¶
type CreateTrustDomainParams struct { ID string Name string Description sql.NullString }
type Datastore ¶
type Datastore struct {
// contains filtered or unexported fields
}
Datastore is a SQL database accessor that provides convenient methods to perform CRUD operations for Galadriel entities. It implements the Datastore interface.
func NewDatastore ¶
NewDatastore creates a new instance of a Datastore object that connects to an SQLite database parsing the connString. The connString should be a file path to the SQLite database file.
func (*Datastore) CreateJoinToken ¶
func (*Datastore) CreateOrUpdateBundle ¶
func (*Datastore) CreateOrUpdateRelationship ¶
func (d *Datastore) CreateOrUpdateRelationship(ctx context.Context, req *entity.Relationship) (*entity.Relationship, error)
func (*Datastore) CreateOrUpdateTrustDomain ¶
func (d *Datastore) CreateOrUpdateTrustDomain(ctx context.Context, req *entity.TrustDomain) (*entity.TrustDomain, error)
CreateOrUpdateTrustDomain creates or updates the given TrustDomain in the underlying db, based on whether the given entity has an ID, in which case, it is updated.
func (*Datastore) DeleteBundle ¶
func (*Datastore) DeleteJoinToken ¶
func (*Datastore) DeleteRelationship ¶
func (*Datastore) DeleteTrustDomain ¶
func (*Datastore) FindBundleByID ¶
func (*Datastore) FindBundleByTrustDomainID ¶
func (*Datastore) FindJoinToken ¶
func (*Datastore) FindJoinTokensByID ¶
func (*Datastore) FindJoinTokensByTrustDomainID ¶
func (*Datastore) FindRelationshipByID ¶
func (*Datastore) FindRelationshipsByTrustDomainID ¶
func (*Datastore) FindTrustDomainByID ¶
func (*Datastore) FindTrustDomainByName ¶
func (d *Datastore) FindTrustDomainByName(ctx context.Context, name spiffeid.TrustDomain) (*entity.TrustDomain, error)
func (*Datastore) ListBundles ¶
func (*Datastore) ListJoinTokens ¶
func (*Datastore) ListRelationships ¶
func (d *Datastore) ListRelationships(ctx context.Context, criteria *criteria.ListRelationshipsCriteria) ([]*entity.Relationship, error)
func (*Datastore) ListTrustDomains ¶
type JoinToken ¶
type Querier ¶
type Querier interface { CreateBundle(ctx context.Context, arg CreateBundleParams) (Bundle, error) CreateJoinToken(ctx context.Context, arg CreateJoinTokenParams) (JoinToken, error) CreateRelationship(ctx context.Context, arg CreateRelationshipParams) (Relationship, error) CreateTrustDomain(ctx context.Context, arg CreateTrustDomainParams) (TrustDomain, error) DeleteBundle(ctx context.Context, id string) error DeleteJoinToken(ctx context.Context, id string) error DeleteRelationship(ctx context.Context, id string) error DeleteTrustDomain(ctx context.Context, id string) error FindBundleByID(ctx context.Context, id string) (Bundle, error) FindBundleByTrustDomainID(ctx context.Context, trustDomainID string) (Bundle, error) FindJoinToken(ctx context.Context, token string) (JoinToken, error) FindJoinTokenByID(ctx context.Context, id string) (JoinToken, error) FindJoinTokensByTrustDomainID(ctx context.Context, trustDomainID string) ([]JoinToken, error) FindRelationshipByID(ctx context.Context, id string) (Relationship, error) FindRelationshipsByTrustDomainID(ctx context.Context, arg FindRelationshipsByTrustDomainIDParams) ([]Relationship, error) FindTrustDomainByID(ctx context.Context, id string) (TrustDomain, error) FindTrustDomainByName(ctx context.Context, name string) (TrustDomain, error) ListBundles(ctx context.Context) ([]Bundle, error) ListJoinTokens(ctx context.Context) ([]JoinToken, error) ListTrustDomains(ctx context.Context) ([]TrustDomain, error) UpdateBundle(ctx context.Context, arg UpdateBundleParams) (Bundle, error) UpdateJoinToken(ctx context.Context, arg UpdateJoinTokenParams) (JoinToken, error) UpdateRelationship(ctx context.Context, arg UpdateRelationshipParams) (Relationship, error) UpdateTrustDomain(ctx context.Context, arg UpdateTrustDomainParams) (TrustDomain, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateBundle ¶
func (*Queries) CreateJoinToken ¶
func (*Queries) CreateRelationship ¶
func (q *Queries) CreateRelationship(ctx context.Context, arg CreateRelationshipParams) (Relationship, error)
func (*Queries) CreateTrustDomain ¶
func (q *Queries) CreateTrustDomain(ctx context.Context, arg CreateTrustDomainParams) (TrustDomain, error)
func (*Queries) DeleteJoinToken ¶
func (*Queries) DeleteRelationship ¶
func (*Queries) DeleteTrustDomain ¶
func (*Queries) FindBundleByID ¶
func (*Queries) FindBundleByTrustDomainID ¶
func (*Queries) FindJoinToken ¶
func (*Queries) FindJoinTokenByID ¶
func (*Queries) FindJoinTokensByTrustDomainID ¶
func (*Queries) FindRelationshipByID ¶
func (*Queries) FindRelationshipsByTrustDomainID ¶
func (q *Queries) FindRelationshipsByTrustDomainID(ctx context.Context, arg FindRelationshipsByTrustDomainIDParams) ([]Relationship, error)
func (*Queries) FindTrustDomainByID ¶
func (*Queries) FindTrustDomainByName ¶
func (*Queries) ListJoinTokens ¶
func (*Queries) ListTrustDomains ¶
func (q *Queries) ListTrustDomains(ctx context.Context) ([]TrustDomain, error)
func (*Queries) UpdateBundle ¶
func (*Queries) UpdateJoinToken ¶
func (*Queries) UpdateRelationship ¶
func (q *Queries) UpdateRelationship(ctx context.Context, arg UpdateRelationshipParams) (Relationship, error)
func (*Queries) UpdateTrustDomain ¶
func (q *Queries) UpdateTrustDomain(ctx context.Context, arg UpdateTrustDomainParams) (TrustDomain, error)
type Relationship ¶
type Relationship struct { ID string TrustDomainAID string TrustDomainBID string TrustDomainAConsent string TrustDomainBConsent string CreatedAt time.Time UpdatedAt time.Time }
func (Relationship) ToEntity ¶
func (r Relationship) ToEntity() (*entity.Relationship, error)
type TrustDomain ¶
type TrustDomain struct { ID string Name string Description sql.NullString CreatedAt time.Time UpdatedAt time.Time }
func (TrustDomain) ToEntity ¶
func (td TrustDomain) ToEntity() (*entity.TrustDomain, error)
type UpdateBundleParams ¶
type UpdateJoinTokenParams ¶
type UpdateTrustDomainParams ¶
type UpdateTrustDomainParams struct { Description sql.NullString ID string }
Click to show internal directories.
Click to hide internal directories.