Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmds/core-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func createKeyResolver() (auth.KeyResolver, error) {
}

func createAuxServer(ctx context.Context, locality string, publicEndpoint string, opts params.Options, logger *zap.Logger) (*aux.Server, error) {
auxStore, err := auxs.Init(ctx, logger, true)
auxStore, err := auxs.Init(ctx, logger, true, locality)
if err != nil {
return nil, err
}
Expand All @@ -111,7 +111,7 @@ func createAuxServer(ctx context.Context, locality string, publicEndpoint string

func createRIDServers(ctx context.Context, locality string, logger *zap.Logger) (*rid_v1.Server, *rid_v2.Server, error) {

ridStore, err := rids.Init(ctx, logger, true)
ridStore, err := rids.Init(ctx, logger, true, locality)
if err != nil {
return nil, nil, err
}
Expand Down Expand Up @@ -141,9 +141,9 @@ func createRIDServers(ctx context.Context, locality string, logger *zap.Logger)
}, nil
}

func createSCDServer(ctx context.Context, logger *zap.Logger) (*scd.Server, error) {
func createSCDServer(ctx context.Context, logger *zap.Logger, locality string) (*scd.Server, error) {

scdStore, err := scds.Init(ctx, logger, true)
scdStore, err := scds.Init(ctx, logger, true, locality)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -327,7 +327,7 @@ func RunHTTPServer(ctx context.Context, ctxCanceler func(), address, locality st

// Initialize strategic conflict detection
if *enableSCD {
scdV1Server, err = createSCDServer(ctx, logger)
scdV1Server, err = createSCDServer(ctx, logger, locality)
if err != nil {
return stacktrace.Propagate(err, "Failed to create strategic conflict detection server")
}
Expand Down
9 changes: 5 additions & 4 deletions cmds/db-manager/cleanup/evict.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
ridmodels "github.com/interuss/dss/pkg/rid/models"
ridrepos "github.com/interuss/dss/pkg/rid/repos"
rids "github.com/interuss/dss/pkg/rid/store"
dssstore "github.com/interuss/dss/pkg/store"
scdmodels "github.com/interuss/dss/pkg/scd/models"
scdrepos "github.com/interuss/dss/pkg/scd/repos"
scds "github.com/interuss/dss/pkg/scd/store"
Expand Down Expand Up @@ -54,12 +55,12 @@ func evict(cmd *cobra.Command, _ []string) error {

logger := logging.WithValuesFromContext(ctx, logging.Logger)

scdStore, err := scds.Init(ctx, logger, false)
scdStore, err := scds.Init(ctx, logger, false, *locality)
if err != nil {
return err
}

ridStore, err := rids.Init(ctx, logger, false)
ridStore, err := rids.Init(ctx, logger, false, *locality)
if err != nil {
return err
}
Expand Down Expand Up @@ -100,7 +101,7 @@ func evict(cmd *cobra.Command, _ []string) error {
}
return nil
}
if err = scdStore.Transact(ctx, scdAction); err != nil {
if _, err = scdStore.Transact(ctx, dssstore.NewFuncOperation(scdAction)); err != nil {
return fmt.Errorf("failed to execute SCD transaction: %w", err)
}

Expand Down Expand Up @@ -145,7 +146,7 @@ func evict(cmd *cobra.Command, _ []string) error {

return nil
}
if err = ridStore.Transact(ctx, ridAction); err != nil {
if _, err = ridStore.Transact(ctx, dssstore.NewFuncOperation(ridAction)); err != nil {
return fmt.Errorf("failed to execute RID transaction: %w", err)
}

Expand Down
7 changes: 7 additions & 0 deletions cmds/dummy-oauth/api/dummyoauth/interface.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ type GetTokenRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const GetTokenRequestType = "GetToken"

func (req *GetTokenRequest) RequestType() string { return GetTokenRequestType }

func (req *GetTokenRequest) IsReadOnly() bool { return false }

type GetTokenResponseSet struct {
// The requested token was generated successfully
Response200 *TokenResponse
Expand Down
80 changes: 80 additions & 0 deletions interfaces/openapi-to-go-server/example/api/rid/interface.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ type SearchIdentificationServiceAreasRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const SearchIdentificationServiceAreasRequestType = "SearchIdentificationServiceAreas"

func (req *SearchIdentificationServiceAreasRequest) RequestType() string {
return SearchIdentificationServiceAreasRequestType
}

func (req *SearchIdentificationServiceAreasRequest) IsReadOnly() bool { return true }

type SearchIdentificationServiceAreasResponseSet struct {
// Identification Service Areas were successfully retrieved.
Response200 *SearchIdentificationServiceAreasResponse
Expand Down Expand Up @@ -104,6 +113,15 @@ type GetIdentificationServiceAreaRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const GetIdentificationServiceAreaRequestType = "GetIdentificationServiceArea"

func (req *GetIdentificationServiceAreaRequest) RequestType() string {
return GetIdentificationServiceAreaRequestType
}

func (req *GetIdentificationServiceAreaRequest) IsReadOnly() bool { return true }

type GetIdentificationServiceAreaResponseSet struct {
// Full information of the Identification Service Area was retrieved successfully.
Response200 *GetIdentificationServiceAreaResponse
Expand Down Expand Up @@ -137,6 +155,15 @@ type CreateIdentificationServiceAreaRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const CreateIdentificationServiceAreaRequestType = "CreateIdentificationServiceArea"

func (req *CreateIdentificationServiceAreaRequest) RequestType() string {
return CreateIdentificationServiceAreaRequestType
}

func (req *CreateIdentificationServiceAreaRequest) IsReadOnly() bool { return false }

type CreateIdentificationServiceAreaResponseSet struct {
// An existing Identification Service Area was created successfully in the DSS.
Response200 *PutIdentificationServiceAreaResponse
Expand Down Expand Up @@ -178,6 +205,15 @@ type UpdateIdentificationServiceAreaRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const UpdateIdentificationServiceAreaRequestType = "UpdateIdentificationServiceArea"

func (req *UpdateIdentificationServiceAreaRequest) RequestType() string {
return UpdateIdentificationServiceAreaRequestType
}

func (req *UpdateIdentificationServiceAreaRequest) IsReadOnly() bool { return false }

type UpdateIdentificationServiceAreaResponseSet struct {
// An existing Identification Service Area was updated successfully in the DSS.
Response200 *PutIdentificationServiceAreaResponse
Expand Down Expand Up @@ -213,6 +249,15 @@ type DeleteIdentificationServiceAreaRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const DeleteIdentificationServiceAreaRequestType = "DeleteIdentificationServiceArea"

func (req *DeleteIdentificationServiceAreaRequest) RequestType() string {
return DeleteIdentificationServiceAreaRequestType
}

func (req *DeleteIdentificationServiceAreaRequest) IsReadOnly() bool { return false }

type DeleteIdentificationServiceAreaResponseSet struct {
// Identification Service Area was successfully deleted from DSS.
Response200 *DeleteIdentificationServiceAreaResponse
Expand Down Expand Up @@ -245,6 +290,13 @@ type SearchSubscriptionsRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const SearchSubscriptionsRequestType = "SearchSubscriptions"

func (req *SearchSubscriptionsRequest) RequestType() string { return SearchSubscriptionsRequestType }

func (req *SearchSubscriptionsRequest) IsReadOnly() bool { return true }

type SearchSubscriptionsResponseSet struct {
// Subscriptions were retrieved successfully.
Response200 *SearchSubscriptionsResponse
Expand Down Expand Up @@ -272,6 +324,13 @@ type GetSubscriptionRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const GetSubscriptionRequestType = "GetSubscription"

func (req *GetSubscriptionRequest) RequestType() string { return GetSubscriptionRequestType }

func (req *GetSubscriptionRequest) IsReadOnly() bool { return true }

type GetSubscriptionResponseSet struct {
// Subscription information was retrieved successfully.
Response200 *GetSubscriptionResponse
Expand Down Expand Up @@ -305,6 +364,13 @@ type CreateSubscriptionRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const CreateSubscriptionRequestType = "CreateSubscription"

func (req *CreateSubscriptionRequest) RequestType() string { return CreateSubscriptionRequestType }

func (req *CreateSubscriptionRequest) IsReadOnly() bool { return false }

type CreateSubscriptionResponseSet struct {
// A new Subscription was created successfully.
Response200 *PutSubscriptionResponse
Expand Down Expand Up @@ -347,6 +413,13 @@ type UpdateSubscriptionRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const UpdateSubscriptionRequestType = "UpdateSubscription"

func (req *UpdateSubscriptionRequest) RequestType() string { return UpdateSubscriptionRequestType }

func (req *UpdateSubscriptionRequest) IsReadOnly() bool { return false }

type UpdateSubscriptionResponseSet struct {
// An existing Subscription was updated successfully.
Response200 *PutSubscriptionResponse
Expand Down Expand Up @@ -383,6 +456,13 @@ type DeleteSubscriptionRequest struct {
// The result of attempting to authorize this request
Auth api.AuthorizationResult
}

const DeleteSubscriptionRequestType = "DeleteSubscription"

func (req *DeleteSubscriptionRequest) RequestType() string { return DeleteSubscriptionRequestType }

func (req *DeleteSubscriptionRequest) IsReadOnly() bool { return false }

type DeleteSubscriptionResponseSet struct {
// Subscription was deleted successfully.
Response200 *DeleteSubscriptionResponse
Expand Down
Loading
Loading