v1beta1connect

package
v0.74.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2025 License: Apache-2.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdempotencyReplyHeader = "X-Idempotency-Replayed"
)

Variables

View Source
var (
	ErrBadRequest             = errors.New("invalid syntax in body")
	ErrInvalidMetadata        = errors.New("metadata schema validation failed")
	ErrOperationUnsupported   = errors.New("operation not supported")
	ErrInternalServerError    = errors.New("internal server error")
	ErrUnauthenticated        = errors.New("not authenticated")
	ErrUnauthorized           = errors.New("not authorized")
	ErrNotFound               = errors.New("not found")
	ErrInvalidEmail           = errors.New("Invalid email")
	ErrUserNotExist           = errors.New("user doesn't exist")
	ErrInvalidNamesapceOrID   = errors.New("namespace and ID cannot be empty")
	ErrConflictRequest        = errors.New("already exist")
	ErrBadBodyMetaSchemaError = errors.New(ErrBadRequest.Error() + " : " + ErrInvalidMetadata.Error())
	ErrInvalidActorType       = errors.New("invalid actor type")
)
View Source
var (
	ErrNamespaceSplitNotation = errors.New("subject/object should be provided as 'namespace:uuid'")
)

Functions

func ExtractLogger added in v0.69.0

func ExtractLogger(ctx context.Context) *zap.Logger

func TransformAuditRecordToPB added in v0.74.0

func TransformAuditRecordToPB(record auditrecord.AuditRecord) (*frontierv1beta1.CreateAuditRecordResponse, error)

Types

type AuditRecordService added in v0.74.0

type AuditRecordService interface {
	Create(ctx context.Context, record auditrecord.AuditRecord) (auditrecord.AuditRecord, bool, error)
}

type BootstrapService added in v0.74.0

type BootstrapService interface {
	AppendSchema(ctx context.Context, definition schema.ServiceDefinition) error
}

type CheckoutService added in v0.74.0

type CheckoutService interface {
	Create(ctx context.Context, ch checkout.Checkout) (checkout.Checkout, error)
	GetByID(ctx context.Context, id string) (checkout.Checkout, error)
	List(ctx context.Context, filter checkout.Filter) ([]checkout.Checkout, error)
	Apply(ctx context.Context, ch checkout.Checkout) (*subscription.Subscription, *product.Product, error)
	CreateSessionForPaymentMethod(ctx context.Context, ch checkout.Checkout) (checkout.Checkout, error)
	CreateSessionForCustomerPortal(ctx context.Context, ch checkout.Checkout) (checkout.Checkout, error)
}

type ConnectHandler

type ConnectHandler struct {
	frontierv1beta1connect.UnimplementedAdminServiceHandler
	frontierv1beta1connect.UnimplementedFrontierServiceHandler
	// contains filtered or unexported fields
}

func NewConnectHandler

func NewConnectHandler(deps api.Deps, authConf authenticate.Config) *ConnectHandler

func (*ConnectHandler) AuthCallback added in v0.69.0

func (*ConnectHandler) AuthLogout added in v0.69.0

func (*ConnectHandler) AuthToken added in v0.69.0

func (*ConnectHandler) Authenticate added in v0.69.0

func (*ConnectHandler) CheckPlanEntitlement added in v0.69.0

func (h *ConnectHandler) CheckPlanEntitlement(ctx context.Context, obj relation.Object) error

CheckPlanEntitlement is only currently used to restrict seat based plans

func (*ConnectHandler) CreateRole added in v0.74.0

func (*ConnectHandler) DeleteRole added in v0.74.0

func (*ConnectHandler) ExportOrganizationProjects added in v0.73.0

func (*ConnectHandler) ExportOrganizationTokens added in v0.73.0

func (*ConnectHandler) ExportOrganizationUsers added in v0.73.0

func (*ConnectHandler) ExportOrganizations added in v0.71.0

func (*ConnectHandler) ExportUsers added in v0.73.0

func (*ConnectHandler) GetLoggedInPrincipal added in v0.69.0

func (h *ConnectHandler) GetLoggedInPrincipal(ctx context.Context, via ...authenticate.ClientAssertion) (authenticate.Principal, error)

func (*ConnectHandler) GetRawCheckout added in v0.69.0

func (h *ConnectHandler) GetRawCheckout(ctx context.Context, id string) (checkout.Checkout, error)

func (*ConnectHandler) GetServiceUser added in v0.69.0

func (*ConnectHandler) IsAuthorized added in v0.69.0

func (h *ConnectHandler) IsAuthorized(ctx context.Context, object relation.Object, permission string) error

func (*ConnectHandler) IsSuperUser added in v0.69.0

func (h *ConnectHandler) IsSuperUser(ctx context.Context) error

func (*ConnectHandler) ListGroups added in v0.74.0

func (*ConnectHandler) ListPlatformPreferences added in v0.69.0

func (h *ConnectHandler) ListPlatformPreferences(ctx context.Context) (map[string]string, error)

func (*ConnectHandler) ListProjects added in v0.74.0

func (*ConnectHandler) ListRelations added in v0.74.0

func (*ConnectHandler) ListResources added in v0.74.0

func (*ConnectHandler) SearchInvoices added in v0.74.0

func (*ConnectHandler) SearchUsers added in v0.73.0

func (*ConnectHandler) UpdatePermission added in v0.74.0

UpdatePermission should only be used to update permission metadata at the moment

func (*ConnectHandler) UpdateRole added in v0.74.0

type CustomerService added in v0.74.0

type CustomerService interface {
	GetByID(ctx context.Context, id string) (customer.Customer, error)
	Create(ctx context.Context, customer customer.Customer, offline bool) (customer.Customer, error)
	List(ctx context.Context, filter customer.Filter) ([]customer.Customer, error)
	UpdateCreditMinByID(ctx context.Context, customerID string, limit int64) (customer.Details, error)
	GetDetails(ctx context.Context, customerID string) (customer.Details, error)
	ListPaymentMethods(ctx context.Context, id string) ([]customer.PaymentMethod, error)
	UpdateDetails(ctx context.Context, customerID string, details customer.Details) (customer.Details, error)
}

type InvoiceService added in v0.74.0

type InvoiceService interface {
	List(ctx context.Context, filter invoice.Filter) ([]invoice.Invoice, error)
	ListAll(ctx context.Context, filter invoice.Filter) ([]invoice.Invoice, error)
	GetUpcoming(ctx context.Context, customerID string) (invoice.Invoice, error)
	TriggerCreditOverdraftInvoices(ctx context.Context) error
	SearchInvoices(ctx context.Context, rqlQuery *rql.Query) ([]invoice.InvoiceWithOrganization, error)
}

type KycService added in v0.73.0

type KycService interface {
	GetKyc(context.Context, string) (kyc.KYC, error)
	SetKyc(context.Context, kyc.KYC) (kyc.KYC, error)
	ListKycs(context.Context) ([]kyc.KYC, error)
}

type OrgBillingService added in v0.71.0

type OrgBillingService interface {
	Search(ctx context.Context, query *rql.Query) (orgbilling.OrgBilling, error)
	Export(ctx context.Context) ([]byte, string, error)
}

type OrgInvoicesService added in v0.71.0

type OrgInvoicesService interface {
	Search(ctx context.Context, id string, query *rql.Query) (orginvoices.OrganizationInvoices, error)
}

type OrgProjectsService added in v0.71.0

type OrgProjectsService interface {
	Search(ctx context.Context, id string, query *rql.Query) (orgprojects.OrgProjects, error)
	Export(ctx context.Context, orgID string) ([]byte, string, error)
}

type OrgServiceUserCredentialsService added in v0.71.0

type OrgServiceUserCredentialsService interface {
	Search(ctx context.Context, id string, query *rql.Query) (svc.OrganizationServiceUserCredentials, error)
}

type OrgTokensService added in v0.71.0

type OrgTokensService interface {
	Search(ctx context.Context, id string, query *rql.Query) (svc.OrganizationTokens, error)
	Export(ctx context.Context, orgID string) ([]byte, string, error)
}

type OrgUsersService added in v0.71.0

type OrgUsersService interface {
	Search(ctx context.Context, id string, query *rql.Query) (orgusers.OrgUsers, error)
	Export(ctx context.Context, orgID string) ([]byte, string, error)
}

type PermissionService added in v0.74.0

type PermissionService interface {
	Get(ctx context.Context, id string) (permission.Permission, error)
	List(ctx context.Context, filter permission.Filter) ([]permission.Permission, error)
	Upsert(ctx context.Context, perm permission.Permission) (permission.Permission, error)
	Update(ctx context.Context, perm permission.Permission) (permission.Permission, error)
}

type ProjectUsersService added in v0.74.0

type ProjectUsersService interface {
	Search(ctx context.Context, id string, query *rql.Query) (projectusers.ProjectUsers, error)
}

type RelationService added in v0.74.0

type RelationService interface {
	Get(ctx context.Context, id string) (relation.Relation, error)
	Create(ctx context.Context, rel relation.Relation) (relation.Relation, error)
	List(ctx context.Context, f relation.Filter) ([]relation.Relation, error)
	Delete(ctx context.Context, rel relation.Relation) error
}

type RoleService added in v0.74.0

type RoleService interface {
	Get(ctx context.Context, id string) (role.Role, error)
	Upsert(ctx context.Context, toCreate role.Role) (role.Role, error)
	List(ctx context.Context, f role.Filter) ([]role.Role, error)
	Update(ctx context.Context, toUpdate role.Role) (role.Role, error)
	Delete(ctx context.Context, id string) error
}

type UsageService added in v0.74.0

type UsageService interface {
	Report(ctx context.Context, usages []usage.Usage) error
	Revert(ctx context.Context, accountID, usageID string, amount int64) error
}

type UserOrgsService added in v0.73.0

type UserOrgsService interface {
	Search(ctx context.Context, id string, query *rql.Query) (userorgs.UserOrgs, error)
}

type UserProjectsService added in v0.73.0

type UserProjectsService interface {
	Search(ctx context.Context, userId string, orgId string, query *rql.Query) (userprojects.UserProjects, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL