Skip to content

Commit

Permalink
first attempt at adding manual mapper code
Browse files Browse the repository at this point in the history
  • Loading branch information
wTylerReid committed Nov 14, 2024
1 parent c43ba0f commit 7409672
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,25 @@ func LoggingLinkSpec_FromProto(mapCtx *direct.MapContext, in *pb.Link) *krm.Logg
return nil
}
out := &krm.LoggingLinkSpec{}
// MISSING: Name
out.Name = direct.LazyPtr(in.GetName())
out.Description = direct.LazyPtr(in.GetDescription())
// MISSING: CreateTime
// MISSING: LifecycleState
// MISSING: BigqueryDataset
out.CreateTime = direct.StringTimestamp_FromProto(mapCtx, in.GetCreateTime())

// This is the first lifecycle state return by a direct controller, so this is a guess based on other enums
out.LifecycleState = direct.Enum_FromProto(mapCtx, in.GetLifeCycleState())

Check failure on line 49 in pkg/controller/direct/logging/mapper.go

View workflow job for this annotation

GitHub Actions / lint

in.GetLifeCycleState undefined (type *loggingpb.Link has no field or method GetLifeCycleState) (typecheck)

Check failure on line 49 in pkg/controller/direct/logging/mapper.go

View workflow job for this annotation

GitHub Actions / lint

in.GetLifeCycleState undefined (type *loggingpb.Link has no field or method GetLifeCycleState) (typecheck)
out.BigqueryDataset = BigQueryDataset_FromProto(mapCtx, in.BigQueryDataset)

Check failure on line 50 in pkg/controller/direct/logging/mapper.go

View workflow job for this annotation

GitHub Actions / lint

in.BigQueryDataset undefined (type *loggingpb.Link has no field or method BigQueryDataset) (typecheck)

Check failure on line 50 in pkg/controller/direct/logging/mapper.go

View workflow job for this annotation

GitHub Actions / lint

in.BigQueryDataset undefined (type *loggingpb.Link has no field or method BigQueryDataset) (typecheck)
return out
}
func LoggingLinkSpec_ToProto(mapCtx *direct.MapContext, in *krm.LoggingLinkSpec) *pb.Link {
if in == nil {
return nil
}
out := &pb.Link{}
// MISSING: Name
out.Name = direct.ValueOf(in.Name)
out.Description = direct.ValueOf(in.Description)
// MISSING: CreateTime
// MISSING: LifecycleState
// MISSING: BigqueryDataset
out.CreateTime = direct.StringTimestamp_ToProto(mapCtx, in.CreateTime)
// This is the first lifecycle state return by a direct controller, so this is a guess based on other enums
out.LifecycleState = direct.Enum_ToProto(mapCtx, in.GetLifeCycleState())
out.BigqueryDataset = BigQueryDataset_ToProto(mapCtx, in.BigQueryDataset)
return out
}

0 comments on commit 7409672

Please sign in to comment.